You are here: Available Utilities > K > KSDS2SEQ

KSDS2SEQ

Use this utility to read the records of a VSAM KSDS and write the records to a sequential file. The utility removes the index before the record is written.

Note This utility is only available for z/OS systems.

For example, you could run this utility against a VSAM NAFILE and a VSAM POLFILE to produce sequential copies of those files. You could then download the sequential copies from an z/OS system to a Windows Server, where the GenPrint or GenArc programs could use the sequential NAFILE and POLFILE files.

Here is a copy of the JCL. You can find sample JCL for the KSDS2SEQ utility in member KSDS2SQX of JCLLIB.

//* COPY JOBCARD HERE
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*      KSDS2SEQ -
//*
//*      PARAMETERS:
//*         /M=MAX   WHERE MAX IS THE MAXIMUM RECORD LENGTH OF THE
//*                  OUTPUT DATASET (DEFAULT = 512).
//*
//*        JOB PERFORMS 2 STEPS :
//*
//*        1.  DELETES / RE-DEFINES SEQUENTIAL OUTFILE.
//*        2.  RUNS KSDS2SEQ PROGRAM TO COPY VSAM KSDS TO SEQUENTIAL
//*            FILE.  CHANGE FILE NAMES APPROPRIATELY.
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*
//DEL      EXEC PGM=IEFBR14
//OUTFILE  DD DSN=&HLQ..&RES..GENDATA.NAFILE,DISP=(MOD,DELETE),
//         UNIT=SYSDA,SPACE=(TRK,0)
//*
//KSDS2SEQ EXEC PGM=KSDS2SEQ,PARM='/ /M=512'
//STEPLIB  DD  DISP=SHR,DSN=&HLQ..LINKLIB
//         DD  DISP=SHR,DSN=SYS1.SCEERUN
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//INFILE   DD DSN=&HLQ..&RES..GENDATA.NAFILE.KSDS,DISP=SHR
//OUTFILE  DD DSN=&HLQ..&RES..GENDATA.NAFILE,DISP=(,CATLG),
//         UNIT=SYSDA,SPACE=(CYL,(5,1)),
//         RECFM=FB,LRECL=512,BLKSIZE=23040