MAINFRAME - TIP OF THE DAY :
When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Thu Feb 21, 2013 8:30 am Post subject: Joinkeys using ICETOOL
I have three files. I need to compare infile1 with infile2 write into outfile1 and compare infile1 again with infile3 write into outfile2. Can I do it using JOINKEYS and ICETOOL ? If yes, please let me know how.
Which particular ICETOOL function do you fancy using? Unless you have one in mind, and a reason for it, you can easily stick to plain Sort.
I would, assuming there is no trailer on infile2, make one, concatenate infile2, dummy trailer, infile3, include a byte to indicate the source of the infile2/3, use JOINKEYS, use OUTFIL to direct the output to one file dependent on added byte and use SAVE on the other.
Firstly, forget ICETOOL for now. What you want is SORT.
The thing you want in SORT is JOINKEYS.
JOINKEYS matches two input files.
You have a data file and two "key" files.
If you concatenate the "key" files, you only have one JOINKEYS process to run.
If you have a trailer on (at least) your first input file, you will be able to put "a value" as an extension on data from the first "key" file, and "another value" in the same place on the record for data from the second "key" file.
You then do the JOINKEYS as normal. In a COPY operation after the JOINKEYS (still part of the same thing) you can use two OUTFIL statements, which output data to output 1 or output 2 depending on the value of the position populated by "a value"/"another value".
So, find some examples of JOINKEYS. Read in the manual on JOINKEYS. Do some experiments. If you have problems, let us know, with full information. If you get it to work, let us know, with the control cards, as it may help someone with a similar requirement in the future.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Cobol Tutorial This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial This Tutorial covers all important aspects of DFSORT. Has more SORT examples