You are here: Available Utilities > S > SEQ2KSDS

SEQ2KSDS

Use the SEQ2KSDS utility to convert a non-VSAM NAFILE or POLFILE dataset into a VSAM copy of that dataset.

Program names

Syntax

SEQ2KSDS

SEQ2KSDS takes no parameters. A 4-byte key is prefixed to each record of the VSAM dataset as it is created.

You can find sample JCL for running the SEQ2KSDS utility in the SEQ2KSDX member of JCLLIB. The SEQ2KSDX member is also shown below.

//USERIDA  JOB   (33005),'SEQ2KSDS      ',CLASS=T,MSGCLASS=X,
//         NOTIFY=USERID
//*
//         SET HLQ='FSI.V100'    <== SET HIGH LEVEL QUALIFIER
//         SET RES='RPEX1'      <== SET RESOURCE (E.G. RPEX1, UTEX1)
//*
//         JCLLIB  ORDER=&HLQ..PROCLIB
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*        JOB PERFORMS 2 STEPS :
//*
//*        1.  DELETES / RE-DEFINES OUTFILE KSDS.
//*        2.  RUNS SEQ2KSDS PROGRAM TO COPY SEQUENTIAL FILE TO
//*            VSAM KSDS.
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*
//IDCAMS  EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD  *
 
  DELETE FSI.V100.RPEX1.GENDATA.NAFILE.KSDS CLUSTER
 
  DEFINE CLUSTER(NAME(FSI.V100.RPEX1.GENDATA.NAFILE.KSDS) +
           CYL(5 1)     + 
           KEY(4 0)     + 
           REUSE )      +
         DATA(NAME(FSI.V100.RPEX1.GENDATA.NAFILE.KSDS.DATA) + 
           RECORDSIZE(2048 2048) )                      + 
         INDEX(NAME(FSI.V100.RPEX1.GENDATA.NAFILE.KSDS.INDEX))
 
  IF LASTCC = 00 THEN SET MAXCC = 00 
 
//* 
//SEQ2KSDS EXEC PGM=SEQ2KSDS 
//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,DISP=SHR
//OUTFILE  DD DSN=&HLQ..&RES..GENDATA.NAFILE.KSDS,DISP=SHR