:Beginfile and :Endfile Commands
Qedit allows you to build and fill MPE files in UDCs and usefiles:
:BEGINFILE filename
: data records
:ENDFILE
The :Beginfile command opens a new temporary file with 256-byte records. :File equations are allowed to override the format of the file. Qedit writes all of the data records between the :Beginfile and the :Endfile into this new file. Each data record must have a colon at the start, but the colon is not written to the temporary file. Also note that Qedit removes all leading spaces between the colon and the first character on the line. The :Endfile command closes the file as a temporary file. If the session already has a file with the same name, Endfile asks the user if he wishes to purge the existing file or rename the new one. If you don’t want the end-user to go through this dialogue, you should urge the existing file before the :Beginfile.
Examples
You can use this file as input to programs, using a :File command and/or the Stdin parameter of Run:
:purge basename,temp :beginfile basename :menu :endfile :file inname=basename,oldtemp :run dbutil.pub.sys,create;stdin=*inname :reset inname :purge basename,temp
Notes
A useful application of :Beginfile is to create command files in job streams. However, when creating a file with :Beginfile in a job stream, be certain that each data line starts with a colon (:). Otherwise, Qedit thinks that those are Qedit commands and it attempts to execute them.