Convert an Extract File

Extract files can be converted to Archive Files and used in any Archive processes. Use the following JCL to convert an Extract File.

//              EXEC PGM=FOPMMAIN,REGION=0M,
//              PARM=' CON UTILITY subsys planname sqlid userid '
//SYSPRINT      DD SYSOUT=*
//SYSTERM       DD SYSOUT=*

//PSDFDFLT      DD DSN=your.loadlib(FOPMDFLT)      Default Site Options
//PSDFEXTR      DD DSN=dsname,DISP=SHR             Input Extract File
//PSDFARCH      DD DSN=dsname,DISP=SHR             Output Archive File

//SYSIN         
                DD *

EXT_TO_ARC AD adname
/*
Notes:
  • Specify fully qualified names for both the input Extract File and output Archive File datasets.
  • The keyword AD in the EXT_TO_ARC control statement is optional. You can use this keyword to specify the name of an existing Access Definition. Archive checks internally to ensure that the Access Definition matches the contents of the input Extract File. If the Access Definition and input Extract File match, the Access Definition is copied into the output Archive File. If the Access Definition and input Extract File do not match, or if the Access Definition does not exist, the job will terminate with a message indicating the error.
  • If you do not include the AD keyword, Archive will create a default Access Definition, named EXTRACT.TO.ARCHIVE. The generated Access Definition reflects the contents of the input Extract File, but does not include the original selection criteria.
  • The process does not modify the Extract File used as input; the file remains unchanged in its original location.
  • Object Definitions for tables are included in all Extract Files. If definitions for additional objects, such as keys, indexes, and so on, are not stored in the Extract File, you cannot use the converted Archive File to create them. These objects must be explicitly created in a database.
  • You must execute this job for each Extract File you wish to convert.