Sample Program - ARCDATA

The ARCDATA program illustrates how a user-written application creates a selection file. ARCDATA requires these DD statements:

DD Statement

Description

TOPICS

A sequential flat file with fixed-length 100-byte records. This file contains topic item records that were copied from a Mobius-z/OS topics archive.

SELECT

Output file containing variable-length “selection” records. This file, which ARCDATA creates, is suitable for input to ARCSAMP.

SYSOUT

Standard COBOL output message file.

The JCL below illustrates how to create a selection file (denoted as “selected.image.keys”) from an existing topic archive (denoted as “selected.topics.archive”). The first step (“REPRO”) copies topic item records from a VSAM topics archive into a temporary intermediate flat-file sequential dataset. The intermediate dataset contains fixed-length 100-byte records. In the second step, program ARCDATA converts the intermediate dataset into a section file suitable for input into ARCSAMP.


//*
/* The REPRO step copies topic item records from an existing topics VSAM KSDS
//* archive into a temporary fixed-length physical-sequential dataset.
//*
//REPRO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INDD DD  DSN=topics.archive,DISP=SHR                       <== Input
//OUTDD DD DSN=&&TOPICS,DISP=(,PASS),                        <== Output
//         UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE),
//         DCB=(BLKSIZE=27900,LRECL=100,RECFM=FB)
//SYSIN DD *
REPRO INFILE(INDD) OUTFILE(OUTDD) FROMKEY('20 ') TOKEY ('20999999')
/*
//*
//* The ARCDATA step reads the temporary dataset, produced by the prior
//* step, and generates a selection file suitable for input into ARCSAMP.
//*
//ARCDATA EXEC PGM=ARCDATA,COND=(0,LT)
//STEPLIB DD   DSN=view.direct.loadlib,DISP=SHR
//TOPICS  DD   DSN=topic.item.extract,DISP=SHR               <== Input
//SELECT  DD   DSN=selected.image.keys,DISP=(,CATLG,DELETE), <== Output
//             UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE),
//             DCB=(RECFM=VB,BLKSIZE=27998)