URGENT HELP WITH ICETOOL

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
frozenblood
Member
Posts: 1
Joined: Thu Jan 31, 2013 11:58 pm

URGENT HELP WITH ICETOOL

Post by frozenblood » Fri Feb 01, 2013 12:04 am

I have a requirement to create one output file with a header, where inputs are coming from 3 separate files. These 3 input files have millions of record and one common key KKX-ID.

All the numeric fields are binary.

1)The three input file needs to be sorted in order of KKX-ID.
2)All KKX-ID from file1 should be written into output file.
3)Required field from file1 needs in the output file: KKX-ID(1:4), DKD(10:, DKD-DESC(23:30 ),E-BUD-IND(206:1)
4)Required field from file2 needs in the output file: KKX-ID(5:4), KKX-NUMBER(23:30 ),VDI-IND(18:1)
5)Required field from file3 needs in the output file: KKX-ID(1:4),KESK-AVT-AMNT(59:6)
6)The output fields should be in '|'delimited order(input fields are not in delimited order, just for display we have put it)
7)If the KKX-ID is not found in file2 or file3, numeric field needs to be written to output file with zeros & characters with spaces.
8)The output file needs to be sorted by DKD.

Please find below the sample input and output and also the ICETOOL code that i have written which is not working as desired.

Would be glad if you could help me solve this asap as it has really very urgent for me.

Thanks in advance !!

File1: FB record length 500

Required Field position in file:

KKX-ID|DKD |DKD-DESC |E-BUD-IND |
(1:4) |(18:5) |(23:30 ) | (206:1) |
345|93136962 |+PLT EMMA GLTR ITY |Y |
1166|89947260 |SS FLUTTER SLEEVE TOP |N |
1357|90349437 |FAS-PNT 2PKT SLUB-GRAY|Y |
2149|87963278 |VINTG LACE X- |Y |


File2: FB record length 250

Required Field position in file:

KKX-ID|KKX-NUMBER |VDI-IND|
(5:4)|(10: |(18:1)
345| 400931369625|N |
1166| 809709671623|N |
1200| 400879632782|N |
1357| 400903494379|N |
1949| 400879632782|N |


File3: FB record length 173

Required Field position in file:

KKX-ID| KESK-AVT-AMNT |
(5:4)|(59:6) |
345|0000017.100 |
1166|0000018.100 |
1266|0000018.100 |
2149|0000018.100 |
2222|0000018.100 |



output:
KKX-ID|KKX-NUMBER |DKD |DKD-DESC |E-BUD-IND |VDI-IND|KESK-AVT-AMNT
345| 400931369625|93136962 |+PLT EMMA GLTR ITY |Y |N |0000017.100
1166| 809709671623|89947260 |SS FLUTTER SLEEVE TOP |Y |N |0000018.100
1357| 400903494379|90349437 |FAS-PNT 2PKT SLUB-GRAY|Y |N |0000000.000
2149| 000000000000|87963278 |VINTG LACE X- |Y | |0000018.100




Our Code:

//PLOMSHS JOB SSSSS,'PAAA0T',
// CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//******************************************************************
//* S001 -
//******************************************************************
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=TKMA.IKRTQ034.TEST.OUT11,
// DISP=SHR
//IN2 DD DSN=TKMA.IKRTQ034.TEST.OUT22,
// DISP=SHR
//IN3 DD DSN=TKMA.IKRTQ034.TEST.OUT33,
// DISP=SHR
//T1 DD DSN=&&T1,UNIT=CART,BUFNO=20,VOL=(,,,99),RECFM=FB,LRECL=500
//T2 DD DSN=&&T2,UNIT=CART,BUFNO=20,VOL=(,,,99),RECFM=FB,LRECL=250
//T3 DD DSN=&&T3,UNIT=CART,BUFNO=20,VOL=(,,,99),RECFM=FB,LRECL=173
//T4 DD DSN=&&T4,UNIT=CART,BUFNO=20,VOL=(,,,99),RECFM=FB,LRECL=90
//OUT DD DSN=TKMA.IKRTQ034.OUTPUTXT,DISP=(NEW,CATLG,DELETE),
// UNIT=CART,BUFNO=20,VOL=(,,,99),RECFM=FB,LRECL=90
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T2) USING(CTL2)
COPY FROM(IN3) TO(T3) USING(CTL3)
COPY FROM(T1) TO(T4) USING(CTL4)
COPY FROM(T4) TO(OUT) USING(CTL5)
//CTL1CNTL DD *
SORT FIELDS=(1,4,BI,A)
//CTL2CNTL DD *
SORT FIELDS=(5,4,BI,A)
//CTL3CNTL DD *
SORT FIELDS=(1,4,BI,A)
SUM FIELDS=(NONE)
/*
//CTL4CNTL DD *
JOINKEYS F1=T1,FIELDS=(1,4,BI,A)
JOINKEYS F2=T2,FIELDS=(5,4,BI,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,4,F1:18,5,F1:23,30,F1:206,1,F2:10,8,F2:18,1)
OPTION COPY
OUTREC OVERLAY=(90:X)
//CTL5CNTL DD *
JOINKEYS F1=T4,FIELDS=(1,4,BI,A),SORTED
JOINKEYS F2=T3,FIELDS=(1,4,BI,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,49,F2:59,6)
OPTION COPY
/*

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri Feb 01, 2013 1:23 am

Same response as in the other forum with this extar bit: Do not have the bad manners to post in multiple forums at the same time. That will add to the chances of people ignoring your posts.
Regards
Nic

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others