Hi,
I have one querry regarding comparision using ICETOOL.
There are 2 files(fileA and fileB), need to compare it.
There is a field run-date in both the files. While comparing, if the record of fileA is not present in fileB and if the run-date is less than 21 days then only, we need to move this record to fileC.
The topic Create files with matching and non-matching records gives the records which are available in fileA only. In the next step run the above OP file against the following sort card -
Assumptions -
Your run date is between 1-10 columns.
LRECL=80; RECFM=FB
Code:
//SYSIN DD *
* put yyyy-mm-dd as yyyymmdd @ 81 col temp
INREC OVERLAY=(81:1,4, * YYYY
6,2, *MM
9,2) *DD
SORT FIELDS=COPY
INCLUDE COND=(81,8,CH,GT,DATE2-21)
OUTREC BUILD=(1,80)
/*
Now my requirementis,
There is a field Run-date(yyyy-mm-dd) in both the files ICEIN01 and ICEIN02. Now my requirementis a record found in both the files it
should have to write in file OUT. If the record of file ICEIN01,not present in file ICEIN02 and Run-date is less than 21days,
those records I need to write into file A, and the records present only in ICEIN02 has to write in file B.
The above code is doing the same thing except the run-date part. It is not taking into account the run-date.
Murali, can you please tell me how to modify this?
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
Raj,
The above step extract all the records into 3 files (irrespective whether the run date falls with the 21 day range or not).
Quote:
It is not taking into account the run-date
Add the following step after ICE001 step.
Code:
//STEP2 EXEC PGM=SORT
//SORTIN DD DSN=FILEA from ICE001 step goes here
//SORTOUT DD DSN=......
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY THE CONTROL CARD PROVIDED IN MY EARLIER POST WITH REQ CHANGES
/*
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE027A 2 END OF FIELD BEYOND MAXIMUM RECORD LENGTH
ICE751I 0 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E7-K11698
ICE052I 3 END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Sigh. ICE007A is a DFSORT message, not an ICETOOL message, so if you're getting it for a statement in TOOLIN, you are still mixing up DFSORT and ICETOOL JCL.
What Murali gave you had mixed up JCL. What you changed it to appears to still have mixed up JCL. In order to tell you why you're getting the ICE007A, I'd need to see all of your JCL and control statements.
But I don't even know if the job Murali gave you, when corrected, will do what you want since you ignored (twice) what I said about what I really needed to help you:
Quote:
If you want a more specific solution:
Please give an example of the records in each input file and what you expect for output.
Please give the RECFM and LRECL of each input file.
It would be best to just give me that information so we can start over rather than try to "fix" your job which may not do what you want anyway.