Joined: 27 Apr 2005 Posts: 43 Location: United States
Is there a way to use ICETOOLS (or similar) to copy a file and omit records based on field values in a SYSIN or input file? I would like to use a file because the job runs weekly and the 100+ records to OMIT vary each time the job runs.
This JCL is what I have that works, but would like the OMITs in a file so I dont need to 'implement' new control cards every week. The numeric field I'm matching against is packed. Thank you for any advice.
To get the final results in desired order, also appropriate SORT may be needed.
JOIN can be performed by the utility in different ways, so the records order after JOIN is generally unpredictable. This sequence can even change unexpectedly depending on the size of data, e.a.
Joined: 27 Apr 2005 Posts: 43 Location: United States
Hi sergeykey,
The users chged the requirements and they want the omitted records written in a 2nd output file. If you can please tell me the 'key word' to look-up in the manual to accomplish this, I can RTFM to look for the structure.
Joined: 27 Apr 2005 Posts: 43 Location: United States
Hi sergeykey,
Sorry to be so bothersome, but Im still having a difficult time with this Sort. I have been working on the last sort you posted all day and cant figure out how to stop the input file LRECL=1788 from incrementing by 1.
Code:
ICE414A 0 SORTIN (F1) REFORMAT FIELD END AT 1789 IS BEYOND LENGTH OF 1788.
Also I am confused abt these lines --
JOIN_ID,*,1,CH pairing indicator: B/1/2 <-- shld the * be B ?
INCLUDE=(JOIN_ID,NE,C'B'), select non-matching records
What I would like to do is a second sort to include the records omitted on the (working) first sort into a different file. (Maybe I can fit them together later)
I thought it would be as easy as chging 'JOIN UNPAIRED' to 'JOIN PAIRED' but of course that is not valid.
What am I missing? Thank you again for all your help.
Hi sergeykey,
Sorry to be so bothersome, but Im still having a difficult time with this Sort. I have been working on the last sort you posted all day and cant figure out how to stop the input file LRECL=1788 from incrementing by 1.
Code:
ICE414A 0 SORTIN (F1) REFORMAT FIELD END AT 1789 IS BEYOND LENGTH OF 1788.
Check that it is defined as:
Code:
SORTIN_Record,1,1788,CH
The output records are truncated to the original size by
Code:
…BUILD=(SORTIN_Record)
Quote:
Also I am confused abt these lines --
JOIN_ID,*,1,CH pairing indicator: B/1/2 <-- shld the * be B ?
INCLUDE=(JOIN_ID,NE,C'B'), select non-matching records
* - this means: “next position after the previous field”. It cannot be B as per allowed syntax (RTFM).
Quote:
What I would like to do is a second sort to include the records omitted on the (working) first sort into a different file. (Maybe I can fit them together later)
Before adding the second SORT, it would be nice to understand: where is your first SORT?
Quote:
I thought it would be as easy as chging 'JOIN UNPAIRED' to 'JOIN PAIRED' but of course that is not valid.
What am I missing? Thank you again for all your help.
“JOIN PAIRED”
(1) is not allowed by syntax (RTFM), and
(2) it would be the default value, when no JOIN is coded, and
(3) unpaired records are excluded unless explicit “JOIN UNPAIRED” has been coded (RTFM)
Please, demonstrate here YOUR ACTUAL CODE IN FULL, if you really have any problem.
RTFM, RTFM, and RTFM
I RECOMMEND YOU TO COPY-AND-PASTE MY SAMPLE OF CODE PRIOR TO CHANGING IT IN A CRAZY MANNER
********************************* TOP OF DATA ****
- 0004001003
- 0004001011
- 0004004019
< - 0004004014
******************************** BOTTOM OF DATA **
//INVALID DD:
Code:
********************************* TOP OF DATA **********
- 2004001003
- 2004001011
< - 2004004014
- 2004004019
******************************** BOTTOM OF DATA ********
Joined: 27 Apr 2005 Posts: 43 Location: United States
HI sergeyken!
I finally got it going with my files based on your test! Thank You!!
It was the question mark that threw me. I thought I had to provide a value, but once I saw it in your coding and realized that I had to leave it alone, the output looked great.
Code:
REFORMAT FIELDS=(F1:SORTIN_RECORD,
?)
Thanks again So Much for all your help with this.
Wishing you the best, Time2Live
I finally got it going with my files based on your test! Thank You!!
It was the question mark that threw me. I thought I had to provide a value, but once I saw it in your coding and realized that I had to leave it alone, the output looked great.
Code:
REFORMAT FIELDS=(F1:SORTIN_RECORD,
?)
Thanks again So Much for all your help with this.
Wishing you the best, Time2Live