ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Sure Arun...!!
1. Listcat for two ip files with only the latest generation details.
Code: |
//*********************************************************************
//* *
//* GET THE LATEST GDG FILE NAMES FOR THE OUTPUT DATA FILES *
//* *
//*********************************************************************
//*
//LISTCAT EXEC PGM=IDCAMS,COND=(0,NE)
//DD1 DD DISP=SHR,DSN=TTA.TAI23.VRS.POLMSTR(+1)
//DD2 DD DISP=SHR,DSN=TTA.TAI23.VRS.CESSDATA(+1)
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD DISP=(NEW,PASS),DSN=&&LISTGDG,
// SPACE=(TRK,(35,45),RLSE),UNIT=SYSWK
//SYSOUT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSIN DD DISP=SHR,DSN=TTA.RAIPUMO.VRS.CTLCARD(TAIVLST1)
//*
|
2. The sortcard
Code: |
***************************** Top of Data **
PRINT INFILE(DD1) COUNT(0) CHAR
PRINT INFILE(DD2) COUNT(0) CHAR
**************************** Bottom of Data
|
3. Vertical Merge
Code: |
000184 //*********************************************************************
000185 //* *
000186 //* MERGE THE LATEST GDG FILE NAMES WITH THE CONTROL FILE *
000187 //* *
000188 //*********************************************************************
000189 //*
000190 //SORT07 EXEC PGM=SORT,COND=(0,NE),
000191 // PARM='CORE=MAX'
000192 //SYSOUT DD SYSOUT=*
000193 //SORTLIB DD DISP=SHR,DSN=SYS1.SUBLIB
000194 //SORTJNF1 DD DISP=(OLD,DELETE),DSN=&&LISTGDG
000195 //SORTJNF2 DD DISP=SHR,DSN=TTA.TAI23.VRS.TEMPCTRL(+1)
000196 //SORTOUT DD DISP=(,CATLG,),DSN=TTA.TAI23.VRS.CTRL(+1),
000197 // SPACE=(TRK,(10,10),RLSE),
000198 // DCB=(PTS.MODEL,RECFM=FB,LRECL=109),STORCLAS=SCTST,
000199 // MGMTCLAS=MCTST
000200 //SYSIN DD DISP=SHR,DSN=TTA.RAIPUMO.VRS.CTLCARD(TAIVLST2)
000201 //*
|
4. The sortcard
Code: |
***************************** Top of Data **
JOINKEYS FILES=F1,FIELDS=(41,4,D)
JOINKEYS FILES=F2,FIELDS=(1,4,D)
REFORMAT FIELDS=(F1:27,44,F2:45,65)
SORT FIELDS=COPY
**************************** Bottom of Data
|
5. JNF2
Code: |
****** ***************************** Top of Data ******************************
000001 POLM |+00307799272148|+0000303578
000002 CESS |+00241172258705|+0000087257
****** **************************** Bottom of Data ****************************
|
6. Sortout (Final File)
Code: |
****** ***************************** Top of Data ******************************
000001 TTA.TAI23.VRS.POLMSTR.G0004V00 |+00307799272148|+0000303578
000002 TTA.TAI23.VRS.CESSDATA.G0004V00 |+00241172258705|+0000087257
****** **************************** Bottom of Data ****************************
|
|
|