I am trying to create 2 files ouput files from two input files
Ouput file 1-->include based on conditions and write to output
file2 -->include based on condition and write to output if matched with file2 input write from file2 else write from file 1
ICE805I 1 JOBNAME: ISDN8EAM , STEPNAME: PSTN0010
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE007A 1 SYNTAX ERROR
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
ICE007A 1 SYNTAX ERROR
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT
ICE751I 0 C5-I12417 C6-BASE E7-I12417
ICE000I 1 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R1 - 02:57 ON TUE AP
And the problem with writing some code to do that is?
When i wrote the same i got the follwing error so i thought of splittng the step.I guess oufil with ifthen cannot not be used
Thanks
Code:
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=8001
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 8001 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 4000 BYTE LRECL FOR GCIF
ICE751I 0 C5-I12417 C6-BASE C7-K96411 C8-I09439 E9-BASE E7-I12417
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R1 - 06:33 ON WED AP
OPTION COPY
JOINKEYS FILE=F1,FIELDS=(71,22,A),
INCLUDE=(01,4,ZD,EQ,6025,AND, *AUTO-COMPONENT
62,3,ZD,EQ,001,AND, *SEPARATOR CODE
65,3,ZD,EQ,002,AND, *CLASS CODE
68,3,SS,NE,C'0141,0142,0128,0186',AND, *PROD TYPE
68,3,ZD,GE,300) *PROD TYPE
JOINKEYS FILE=F2,FIELDS=(71,22,A)
REFORMAT FIELDS=(F1:1,4000,F2:1,4000,?),FILL=C'*'
JOIN UNPAIRED,F1
OUTFIL FNAMES=GCIFDLT,
IFTHEN=(WHEN=(8001,1,CH,EQ,C'1'),BUILD=(1,4000)),
IFTHEN=(WHEN=(8001,1,CH,EQ,C'B'),BUILD=(4001,4000))
OUTFIL FNAMES=GCIFDLY,INCLUDE=(1,3,CH,EQ,C'***'),
BUILD=(4001,4000)
ICE052I 3 END OF DFSORT
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Can you try the following?
You didn't make it clear what you wanted originally, you haven't responded to all questions, you've ignored advice, you didn't explain your problem, and you chopped off relevant information in an error message.
If this does not work for what you want, paste the full sysout from the step, without chopping anything off, explain clearly and fully what you want, provide sample input and expected output for the sample data.
Can you confirm that you have looked at the INCLUDE COND lines four and five and feel that line four is still required? Can you confirm that your INCLUDE= is because your data has "***" in that position, and if so why you decided to confuse things for any readers of your code by using FILL=C'*'?
The code given is exactly what i was looking for and plz let me test it.Thanks
Not sure what went wrong with my code.
Include line five is typo error it should be 68,3,ZD,GE,030
Input data do not have *'s i used below code because i want to extract records from only from file2 using jnf1cntl criteria,so i used INCLUDE=(1,3,CH,EQ,C'***').plz correct me if i am wrong or not clear
May be i have improve my presentation skills.I will keep your advices in mind going forward.Thanks for correcting me
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Code:
JOIN UNPAIRED,F1
This means: give the Main Task all the paired records, and all the unpaired F1 records.
There will be no unpaired F2 records.
With that, the obvious interpretation of your control cards was that your second OUTFIL was attempting to get the unmatched F1 records. With no exact description of what you want, no sample input and expected output, we can't see what it is you meant to type instead of what you showed us.
Code:
JOIN UNPAIRED
or (they are the same)
JOIN UNPAIRED,F1,F2
You can then OMIT= the 8001 equal to "2" on your first OUTFIL and use SAVE on your second OUTFIL instead of the INCLUDE=.
The above code is returning empty files.Plz advise
Code:
ICE805I 1 JOBNAME: ISDN8EAM , STEPNAME: PSTN0010
ICE802I 0 BLOCKSET TECHNIQUE IN CONTROL
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=8001
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE858I 0 LA=520696, DA=6144, AA=514552, BA=4042, CP=3, TA=4093
ICE859I 0 LB=8540, DB=528, AB=8012, BB=0, CP=0, RS=0, TB=20
ICE860I 0 F=YN, P=2, M=N, B=2048
ICE906I 0 ST=ABOVE,SR=6291456,RC=0
ICE907I 0 ST=ABOVE,SA=6291440,NF=1,LF=6291440,SF=6291440
ICE906I 0 ST=BELOW,SR=540632,RC=0
ICE907I 0 ST=BELOW,SA=540616,NF=1,LF=540616,SF=540616
ICE751I 0 C5-I12417 C6-BASE C7-K96411 C8-I09439 E9-BASE C9-BASE E5-BASE
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R1 - 08:22 ON WED AP