kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Feb 01, 2010 8:22 pm Post subject: |
|
|
Martin,
A coded example
Code: |
//*********************************************************************
//* RUN LISTCAT AGAINST THE BASE *
//*********************************************************************
//STEP0100 EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=&L,
// DISP=(,PASS),
// SPACE=(CYL,(1,1),RLSE),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)
//SYSTSIN DD *
LISTCAT ENT('HLQ.PROD.MARKET.PRICE') NAME
//*
//*********************************************************************
//* EXTRACT THE GDG GENERATION NAMES AND CREATE 80 BYTE FILE *
//*********************************************************************
//STEP0200 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&L,DISP=SHR
//SORTOUT DD DSN=&&G,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(4,7,CH,EQ,C'NONVSAM')
OUTREC BUILD=(17,44,80:X)
//*
//*********************************************************************
//* CONCATENATE THE EXCLUDE FILE AND EXTRACTED GDG GENERATION FILE *
//* WITH HEADER '$$$' AND CREATE THE DYNAMIC CONCATENATION LIST *
//*********************************************************************
//STEP0300 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
$$$
// DD DSN=&&G,DISP=SHR
// DD *
$$$
// DD *
HLQ.PROD.MARKET.PRICE.G0001V00
HLQ.PROD.MARKET.PRICE.G0002V00
HLQ.PROD.MARKET.PRICE.G0003V00
HLQ.PROD.MARKET.PRICE.G0004V00
HLQ.PROD.MARKET.PRICE.G0005V00
HLQ.PROD.MARKET.PRICE.G0006V00
//OUT DD DSN=&&O,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,44,CH) NODUPS USING(CTL1)
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'$$$'),PUSH=(81:ID=1))
OUTFIL FNAMES=OUT,IFOUTLEN=80,NULLOFL=RC4,
INCLUDE=(81,1,ZD,EQ,1,AND,1,3,CH,NE,C'$$$'),
IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,3,ZD)),
IFTHEN=(WHEN=(81,3,ZD,EQ,1),
BUILD=(C'//SYSUT1 DD DISP=SHR,DSN=',1,44,80:X)),
IFTHEN=(WHEN=NONE,
BUILD=(C'//',12:C'DD DISP=SHR,DSN=',1,44,80:X))
//*
//*********************************************************************
//* CREATE THE JCL TO BE SUBMITTED TO THE INTRDR *
//*********************************************************************
//STEP0400 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DATA,DLM=$$
//TIDXXXXA JOB 'COPY',
// CLASS=A,
// MSGCLASS=Y,
// MSGLEVEL=(1,1),
// NOTIFY=TID
//*
//STEP0100 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=*
$$
// DD DSN=&&O,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
//* |
_________________ Kolusu
www.linkedin.com/in/kolusu |
|