FROMKEY and TOKEY

REPRO                                                                      – INDATASET(STUDENT.TEST.INPUT)             – OUTDATASET(STUDENT.KSDS.CLUSTER)   – FROMKEY(100000) TOKEY(500000) This command will copy all records with key values ranging from 100000 to 500000. The range can also be generic (Eg. FROMKEY (10)  TOKEY(50)). This will copy all records in input file with 10 as the first two bytes of the key through the records having 33 as…

Details

SKIP and COUNT command

REPRO                                                                      – INDATASET(STUDENT.TEST.INPUT)             – OUTDATASET(STUDENT.KSDS.CLUSTER)   – SKIP (2)                                                                     – COUNT (4) The SKIP and COUNT is used to selectively copy records to the output file. In this case the first 2 records are skipped and only the next 4 records are copied to the output file. If SKIP is ignored then default value is SKIP (0)…

Details

REUSE Command

REPRO                                                                      – INDATASET(STUDENT.TEST.INPUT)             – OUTDATASET(STUDENT.KSDS.CLUSTER)   – REUSE On using REUSE in a REPRO command, the records in target KSDS, ESDS, RRDS or LDS are logically deleted and the records from the source are added as if the target data set were empty. For REUSE option to be used (while loading datasets), the target DS should…

Details

How to define a KSDS cluster

Consider creating a KSDS data set for student information with 3 fields – Student name (20 bytes), Student number (12 bytes) and data of birth (10 bytes mm/dd/yyyy). The JCL to allocate the KSDS file is as shown below. //KSDSALLC JOB (ACCT),’KSDS ALLOCATE’ //ALLOCATE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER                                   …

Details