/* DRCTIDEN - Create IDEN SOURCE file to be used to migrate IDENTITY */ /* and SUBCONFIG directory entries from source z/VM system */ /* to an interim file that can be appended to the USER INPUT*/ /* file. */ /* Runs on the target system */ /* input files */ /* List of profile entries to be migrated - created by exec DIRLIST */ IDENLIST='MIGRATE IDENLST A' /* Flat file copy of the SOURCE z/VM system's user directory */ /* SOURCEIN='SOURCE DIRECT A' */ SOURCEIN='TARGET DIRECT A' /* Output file - USER DIRECT A - becomes input to DIRECTXA */ IDENDIR='IDEN SOURCE A' /* call CheckIp to verify that all input files exist */ Call CheckIp /* erase the output file if it exists */ ADDRESS COMMAND 'ESTATE 'IDENDIR If RC = 0 then 'ERASE 'IDENDIR /* create a new output file - must have RECFM F */ Say 'Creating 'IDENDIR 'EXECIO 1 DISKW 'IDENDIR' 0 F 80 (STRING *' /* copy profiles to the output file using the GetDir procedure */ /* Note: profiles must be copied first to insure they are present */ /* when the user entries are processed */ 'pipe < 'IDENLIST' | stem IDENS.' Say 'Copying IDENTITY statements from 'SOURCEIN Do I = 1 to IDENS.0 NAME=IDENS.I Call GetIden End Say "File "IDENDIR" has been created" Exit GetIden: /* extract IDENTITY and SUBCONFIG statements from the SOURCEIN */ /* file and place them into the output file */ Linein(SOURCEIN,1,0) Do Forever LINE=Linein(SOURCEIN) Parse var LINE W1 W2 . If W1='IDENTITY' & W2 = NAME then Do 'pipe var LINE | specs 1-72 1 | pad 80', '| block 80 fixed | >> ' IDENDIR Say "Copying " W1 W2 "to File " IDENDIR Do Forever LINE=Linein(SOURCEIN) Parse var LINE L1 . If L1="IDENTITY" | L1="USER" then Return 'pipe var LINE | specs 1-72 1 | pad 80', '| block 80 fixed | >> ' IDENDIR Parse var LINE L1 . End /* copy records loop */ End /* if found loop */ End/* main loop */ Return CheckIp: /* check for the input files - exit with RC 04 if not found */ IFiles.1=IDENLIST IFiles.2=SOURCEIN IFiles.0=2 Do C=1 to IFiles.0 ADDRESS COMMAND 'ESTATE 'IFiles.C If RC <> 0 then Do Say 'Input file 'IFiles.C' not found - terminating' Exit 4 End End Return