The program reads the control statements via SYSDTA. Messages are output via SYSOUT and/or SYSLST, depending on the logging options specified (see the MODIFY-LOGGING-OPTIONS and SHOW-LOGGING-OPTIONS statements).
Example
/START-EXECUTABLE-PROGRAM FROM-FILE=PAMCONV 1. % BLS0523 ELEMENT 'PAMCONV', VERSION '<version>', TYPE 'L' FROM LIBRARY ':1OSH:$TSOS.SYSLNK.PAMCONV.<version>' IN PROCESS % BLS0524 LLM 'PAMCONV', VERSION '<version>' OF '<date> <time>' LOADED % PEA7000 <time> PAMCONV VERSION <version> STARTED IN BS2000 <version> % PEA7001 PLEASE ENTER PAMCONV STATEMENTS %//CONVERT-FILE FROM-FILE=DAT*,SELECT=BY-ATTRIBUTES(CREATION-DATE= INTERVAL(,YESTERDAY),FILE-STRUCTURE=SAM),TO-FILE=NK.DAT* 2. % PEA5000 CONVERSION TO NON-KEY FORMAT COMPLETED. SOURCE FILE: ':N:$USER0001.DATEI1'; TARGET FILE: ':N:$USER0001.NK.DATEI1' % PEA5000 CONVERSION TO NON-KEY FORMAT COMPLETED. SOURCE FILE: ':N:$USER0001.DATEI2'; TARGET FILE: ':N:$USER0001.NK.DATEI2' % PEA5000 CONVERSION TO NON-KEY FORMAT COMPLETED. SOURCE FILE: ':N:$USER0001.DATEI3'; TARGET FILE: ':N:$USER0001.NK.DATEI3' % PEA5000 CONVERSION TO NON-KEY FORMAT COMPLETED. SOURCE FILE: ':N:$USER0001.DATEI4'; TARGET FILE: ':N:$USER0001.NK.DATEI4' 3. %//CONVERT-FILE FROM-FILE=DAT*,TO-FILE=NK.DAT* 4. % PEA5000 CONVERSION TO NON-KEY FORMAT COMPLETED. SOURCE FILE: ':N:$USER0001.DATEI5'; TARGET FILE: ':N:$USER0001.NK.DATEI5' 5. % PEA2103 'TO-FILE' ALREADY EXISTS. TARGET FILE: 'NK.DATEI1' % PEA2103 'TO-FILE' ALREADY EXISTS. TARGET FILE: 'NK.DATEI2' % PEA2103 'TO-FILE' ALREADY EXISTS. TARGET FILE: 'NK.DATEI3' % PEA2103 'TO-FILE' ALREADY EXISTS. TARGET FILE: 'NK.DATEI4' 6. %//MODIFY-CONVERT-FILE-DEFAULTS SELECT=BY-ATTRIBUTES(FILE-STRUCTURE=ISAM) 7. %//SHOW-CONVERT-FILE-DEFAULTS 8. % CURRENT CONVERT-FILE DEFAULTS % DIRECTION : TO-NONKEY % SELECT : BY-ATTRIBUTES( ) % CREATION-DATE : ANY % LAST-ACCESS-DATE : ANY % SIZE : ANY % ACCESS-METHOD : ISAM % BLKSIZE : ANY % BLKCTRL : ANY % TO-FILE-BLKSIZE : STD % TO-FILE-BLKCTRL : STD % REPLACE-OLD-FILES : NO % FILE-DISPOSAL : KEEP % PROTECTION : STD % DEVICE-FOR-TEMPFILE : NONE 9. %//CONVERT-FILE DIRECTION=NONKEY-TO-KEY,FROM-FILE=NK.DAT*,TO-FILE=K.DAT* 10. % PEA5001 CONVERSION FROM NON-KEY TO KEY FORMAT COMPLETED. SOURCE FILE: ':N:$USER0001.NK.DATEI5'; TARGET FILE: ':N:$USER0001.K.DATEI5' 11. %//CLASSIFY-FILE FROM-FILE=*DAT* 12. % CLASSIFY-FILE *DAT* DIRECTION = KEY-TO-NONKEY % % FILENAME ! CONVER- ! % ! TIBLE ! % :N:$USER0001.DATEI1 .................................. ! YES ! % :N:$USER0001.DATEI2 .................................. ! YES ! % :N:$USER0001.DATEI3 .................................. ! YES ! % :N:$USER0001.DATEI4 .................................. ! YES ! % :N:$USER0001.DATEI5 .................................. ! YES ! % :N:$USER0001.K.DATEI5 ................................ ! YES ! % :N:$USER0001.NK.DATEI1 ............................... ! YES ! % :N:$USER0001.NK.DATEI2 ............................... ! YES ! % :N:$USER0001.NK.DATEI3 ............................... ! YES ! % :N:$USER0001.NK.DATEI4 ............................... ! YES ! % :N:$USER0001.NK.DATEI5 ............................... ! YES ! % 11 FILE(S)LISTED 13. %//END 14. % PEA7003 10:01:09/1.5323 PAMCONV TERMINATED ABNORMALLY 15.
The PAMCONV program is called.
The CONVERT-FILE statement is entered with partially qualified file names and selection criteria.
Acknowledgment of successful file conversion.
Input of the CONVERT-FILE statement with partially qualified file names without further selection criteria.
Acknowledgments of successful file conversions.
File exists already, conversion is rejected.
Definition of selection criteria for further CONVERT-FILE statements.
Input of the SHOW-CONVERT-FILE-DEFAULTS statement.
Output of the values requested via the SHOW-CONVERT-FILE-DEFAULTS statement. The values shown are the defaults for subsequent CONVERT-FILE statements.
Input of the CONVERT-FILE statement with partially qualified file names for NK to K conversion.
Acknowledgments of successful file conversions.
Input of the CLASSIFY-FILE statement with partially qualified file names.
Output of the values requested via the CLASSIFY-FILE statement. Classification of the input files by convertibility.
Input of the END statement.
The PAMCONV program is terminated abnormally, since an error has occurred in the PAMCONV run.