| Directives |
|
| Format | SAVE
[EDIT] [ prog_name$ [ ,prog_size ]
[,
IND=ver ] [, MSG=note ] [ ,OWN=owner_id [,
FLG=flg:flg:flg ] ] ]
|
|||||||||||||||
| *Note* | The OWN= and FLG= options are designed for use by registered application developers. They are used to encrypt programs and establish activation keys to run the programs. | |||||||||||||||
| Description | Use
the SAVE directive to copy/write the
current program to your given filename. (Include the pathname if the directory you want is neither current nor in your PREFIX definition.) If the file does not already exist, a program file is created. If you include the prog_size argument, the file specified must not already exist. If the output of the file is a program file type, ProvideX writes it to the file in internal (compiled) format. For serial and indexed file types, ProvideX writes the program in display (LIST) format. You can only use the SAVE directive for serial, indexed, and program files |
|||||||||||||||
| *Note* | You can RUN, CALL or PERFORM text files that contain programs just as you would any regular program file. | |||||||||||||||
| *Note* Source Control Interface |
If
you are using PxPlus and have a ".pluscvs" file in the
target directory where a program is being saved, a
source/text copy of the program will be placed in the
directory whose name is contained within the .pluscvs
file. The source/text file will have a suffix of
".pxprg" appended to its file name to identify
it as a PxPlus program. This process is designed to provide an automated means to feed program changes to a source control system. |
|||||||||||||||
| Structured Save | The
SAVE directive can also be used to verify modified
programs for structural integrity ('SS' System
Parameter,). Logical errors (e.g., a FOR with no
corresponding NEXT or a SWITCH without an END SWITCH)
will result in a
Indicating where the fault was detected. For more information on logical structures, refer to the Users Guide. |
|||||||||||||||
| Multiple Program versions | In
PxPlus, if the '+R'
system parameter is non-zero, the SAVE command will maintain
prior 'Interim' versions of the program in the
program file. The value set in the '+R' system parameter
defines the number of proir versions that the SAVE
command will keep (max 200 - default 5). Maintaining prior versions of the program on the program file will not effect the performance nor program size during normal execution. The only impact of keeping prior versions is the physical size of the file and the time required to issue a SAVE command when updating the program. See Version Control in the Users Guide. |
|||||||||||||||
| See Also | SERIAL
Create a Sequential File. PROGRAM Create a Program File. |
|||||||||||||||
| Example |
|
|||||||||||||||
| *Note* | The ability to add a Note to a program, the Source Control interface and the ability to store multiple versions of a program on a program file are all +PxPlus Exclusive features | |||||||||||||||