|
FLAT & VSAM files |
|
|
A flat file is a file containing records that have no physical record organization: on Unix/Linux and Windows records are only a logical entity. XVSAM bypasses this limit and allows to have files with a record-based organization, which may be accessed either in sequential or keyed mode. During the conversion process it is important to define if a file will be handled as flat or XVSAM, and, due to the different kind of organization, direct operations on file (i.e creation, deleting, copy, etc) must be converted differently. In the following paragraphs, some example of conversion will be shown. Define vsam Mainframe: // EXEC IDCAMS,SIZE=AUTO Unix, Linux & Windows: xvsam --create --catalog VACAT5 --record-length 39 --key 0,19 --type ksds VA.PMEDIO.COS flat Mainframe: // EXEC IDCAMS,SIZE=AUTO Unix, Linux & Windows: touch $XVSAM/WKCAT1/VA.GDBT10 Delete vsam Mainframe: // EXEC IDCAMS,SIZE=AUTO Unix, Linux & Windows: xvsam --delete --catalog VACAT5 VA.PMEDIO.COS flat Mainframe: // EXEC IDCAMS,SIZE=AUTO Unix, Linux: rm -f $XVSAM/$IJSYSUC/VA.GDBT10 Windows: del %XVSAM%\%IJSYSUC%\VA.GDBT10 Alter vsam Mainframe: * JOB ALTER Unix, Linux & Windows: xvsamRename VACAT5 VA.ORD.S VACAT5 VA.ORD.IM.S flat Mainframe: * JOB ALTER Unix, Linux: mv $XVSAM/WKCAT1/VA.GDBT10 $XVSAM/WKCAT1/VA.GDBT10.OLD Windows: move %XVSAM%\WKCAT1\VA.GDBT10 %XVSAM%\WKCAT1\VA.GDBT10.OLD Repro vsam Mainframe: // DLBL INPU,'IPOST.ASSFAM.ANAG',,VSAM,CAT=IPUCT06 Unix, Linux & Windows: xvsam --repro --input-catalog IPUCT06 --input-cluster IPOST.ASSFAM.ANAG \ flat Mainframe: // DLBL IJSYSUC,'WKCAT1',,VSAM Unix, Linux & Windows: cp $XVSAM/WKCAT1/PPROD8J.TXT $XVSAM/VACAT5/PPROD8J.TXT |