IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Join Keys ;Write from f2 if match unmatched write from f1


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Tue Apr 01, 2014 12:29 pm
Reply with quote

Hello,

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

Code:


JOINKEYS FILE=F1,FIELDS=(71,22,A),                             
INCLUDE=(01,4,ZD,EQ,6025,AND,                             62,3,ZD,EQ,001,AND,                           65,3,ZD,EQ,002,AND,                             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,                                         
OUTREC  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)       



I am getting the below error when i do please advise

Code:

OUTREC  IFTHEN=(WHEN=(8001,1,CH,EQ,C'1'),BUILD=(1,4000)), 
      $                                                   
       IFTHEN=(WHEN=(8001,1,CH,EQ,C'B'),BUILD=(4001,4000))
       $                                                   



let me know if i am not clear.Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 01, 2014 12:56 pm
Reply with quote

You have to show the full message, including the message number. There is no point in cutting it off and just showiing us where "some" error is.
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Tue Apr 01, 2014 1:16 pm
Reply with quote

Code:


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
                                                                               
          * 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,                                         
            OUTREC  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                                                     
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 01, 2014 1:46 pm
Reply with quote

OK, you perhaps think your are using OUTFIL OUTREC and that OUTREC on OUTFIL is like OUTREC. OUTREC on OUTFIL is like (identical to) BUILD.

Save yourself the confusion (how long did it take you to understand the above sentence?) and don't use OUTREC on OUTFIL. Use BUILD instead.

Then you will easily see that the code is plain wrong. Just remove the BUILD (which you've just changed from OUTREC to make it easy to understand).
Code:

            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                                               
  OPTION COPY                                                         
            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))     


You should also check your INCLUDE. Concentrate on what the last two mean, and then delete the penultimate.

If you consider using DFSORT symbols/SYMNAMES, you get the comment automatically with the field-name.
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Tue Apr 01, 2014 2:57 pm
Reply with quote

Hi Bill,

Thanks for the reply.

My requirement is to create two output files .It would you good if it can be done in single step.

Using the code you have posted i cannot create two files are you recomending to use another step?

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 01, 2014 5:28 pm
Reply with quote

It's not really "the code I posted", it is your code with the errant BUILD (disguised as OUTREC) removed.

If you want two output files, you need to add another OUTFIL. This will define the second file, and its content.
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Tue Apr 01, 2014 5:43 pm
Reply with quote

Hi Bill ,

Thanks again for the reply

Outfil with ifthen will not helping is there a way to create multiple files with if then?

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Apr 01, 2014 5:46 pm
Reply with quote

Why would OUTFIL not help? It is the only way to create multiple files from DFSORT.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Apr 01, 2014 9:33 pm
Reply with quote

A better control cards would be

Code:

//SYSIN    DD *                                                       
  JOINKEYS FILE=F1,FIELDS=(71,22,A)                                   
  JOINKEYS FILE=F2,FIELDS=(71,22,A)                                   
  REFORMAT FIELDS=(F1:1,4000,F2:1,4000,?)                             
  JOIN UNPAIRED,F1                                                     
  OPTION COPY                                                         
  OUTFIL FNAMES=GCIFDLT,INCLUDE=(8001,1,CH,EQ,C'B'),BUILD=(4001,4000) 
  OUTFIL FNAMES=GCIFDLY,SAVE,BUILD=(1,4000)                           
//*                                                                   
//JNF1CNTL DD *                                                       
  INCLUDE COND=(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     
//*                                                                   
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2014 3:46 pm
Reply with quote

Skolusu wrote:
A better control cards would be

Code:

//SYSIN    DD *                                                       
  JOINKEYS FILE=F1,FIELDS=(71,22,A)                                   
  JOINKEYS FILE=F2,FIELDS=(71,22,A)                                   
  REFORMAT FIELDS=(F1:1,4000,F2:1,4000,?)                             
  JOIN UNPAIRED,F1                                                     
  OPTION COPY                                                         
  OUTFIL FNAMES=GCIFDLT,INCLUDE=(8001,1,CH,EQ,C'B'),BUILD=(4001,4000) 
  OUTFIL FNAMES=GCIFDLY,SAVE,BUILD=(1,4000)                           
//*                                                                   
//JNF1CNTL DD *                                                       
  INCLUDE COND=(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     
//*                                                                   



Hi SKolusu,

The code given will create matched recs on one file and unmatched on other file


My requirement is to create matched and unmatched in same output file1 and in output file 2 all the records in f1 using the include cond.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 02, 2014 3:58 pm
Reply with quote

And the problem with writing some code to do that is?
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2014 4:01 pm
Reply with quote

Thanks Bill Woodger and skolusu for your help

I have to split the steps to fix the problem. now its working fine.
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2014 4:15 pm
Reply with quote

Bill Woodger wrote:
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                                                 

Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 02, 2014 5:44 pm
Reply with quote

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'*'?

Code:

                                                                     
 JOINKEYS FILE=F1,FIELDS=(71,22,A)
 JOINKEYS FILE=F2,FIELDS=(71,22,A)
                                                                     
 JOIN UNPAIRED,F1
                                                                     
 REFORMAT FIELDS=(F1:1,4000,F2:1,4000,?)

  OPTION COPY         
                                                             
  OUTFIL FNAMES=GCIFDLT,
         IFTHEN=(WHEN=(8001,1,CH,EQ,C'1'),BUILD=(1,4000)),
         IFTHEN=(WHEN=NONE,BUILD=(4001,4000))
                                                                     
  OUTFIL FNAMES=GCIFDLY,INCLUDE=(1,3,CH,EQ,C'***'),
         BUILD=(4001,4000)

//JNF1CNTL DD *
 INCLUDE COND=(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
 
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2014 6:10 pm
Reply with quote

Hi Bill Woodger,

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
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 02, 2014 6:24 pm
Reply with quote

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=.
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2014 6:29 pm
Reply with quote

HI Bill Woodger,

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
                                                                               
            JOINKEYS FILE=F1,FIELDS=(71,22,A)                                   
             JOINKEYS FILE=F2,FIELDS=(71,22,A)                                 
                                                                               
             JOIN UNPAIRED,F1                                                   
                                                                               
             REFORMAT FIELDS=(F1:1,4000,F2:1,4000,?)                           
              OPTION COPY                                                       
                                                                               
              OUTFIL FNAMES=GCIFDLT,                                           
                     IFTHEN=(WHEN=(8001,1,CH,EQ,C'1'),BUILD=(1,4000)),         
                     IFTHEN=(WHEN=NONE,BUILD=(4001,4000))                       
                                                                               
              OUTFIL FNAMES=GCIFDLY,INCLUDE=(1,3,CH,EQ,C'***'),                 
                     BUILD=(4001,4000)                                         
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
ICE252I 1 PARMLIB OPTIONS WERE MERGED WITH INSTALLATION MODULE DEFAULTS         
ICE089I 0 ISDN8EAM.PSTN0010.        , INPUT LRECL = 8001, TYPE = F             
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)                           
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=524248,MINLIM=262144,EQUALS=N,LIST=Y,ERET
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,WRKSEC=Y,OUTSEC=N,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=0,CINV=Y,CFW=Y,DS
ICE132I 0 OPTIONS: VLSHRT=Y,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=4      ,DSPSIZE=MAX ,ODMAXBF=2097152,SOLRF=Y,VLLONG=N
ICE235I 0 OPTIONS: NULLOUT=RC0                                                 
ICE236I 0 OPTIONS: DYNAPCT=10 ,MOWRK=Y,TUNE=STOR,EXPMAX=MAX    ,EXPOLD=50%    ,E
ICE889I 0 CT=MAX     , SB=3, L=0, D=0000, CCW=1MAM                             
ICE906I 1 ST=ABOVE,SR=6234096,RC=0                                             
ICE907I 1 ST=ABOVE,SA=6234080,NF=1,LF=6234080,SF=6234080                       
ICE906I 1 ST=BELOW,SR=98344,RC=0                                               
ICE907I 1 ST=BELOW,SA=49176,NF=1,LF=49176,SF=49176                             
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 20480, ABOVE 16M = 4191232     
ICE855I 0 GCIFDLT  : TX=N, R=J, L=J, B=D, BL=0, BR=0, DCT=43, VS=N, RU=X, SB=8 
ICE210I 0 GCIFDLT  : EXCP USED, LRECL = 4000, BLKSIZE = 24000, TYPE = FB       
ICE855I 0 GCIFDLY  : TX=N, R=J, L=J, B=D, BL=0, BR=0, DCT=43, VS=N, RU=X, SB=8 
ICE210I 0 GCIFDLY  : EXCP USED, LRECL = 4000, BLKSIZE = 24000, TYPE = FB       
ICE751I 1 EF-BASE   CB-BASE   F0-BASE   E8-I12417                               
ICE421I 0 JOINED RECORDS: COUNT=0                                               
ICE055I 0 INSERT 0, DELETE 0                                                   
ICE054I 0 RECORDS - IN: 0, OUT: 0                                               
ICE227I 0 GCIFDLT  : DELETED = 0, REPORT = 0, DATA = 0                         
ICE228I 0 GCIFDLT  : TOTAL IN = 0, TOTAL OUT = 0                               
ICE227I 0 GCIFDLY  : DELETED = 0, REPORT = 0, DATA = 0                         
ICE228I 0 GCIFDLY  : TOTAL IN = 0, TOTAL OUT = 0                               
ICE804I 5 OUTFIL   EXCP COUNT: 0                                               
ICE174I 0 NO DATA RECORDS FOR AN OUTFIL DATA SET - RC=0                         
ICE891I 1 6283288 WMAIN, 8168 CMAIN, MAX CALLOC, N SCN, B BA, 4 AZ, 32 BZ, NN QC
ICE892I 1 8001 RIN  0 BLI  0 BLO  8002 RUN  0 BUN  2827 CPU  00 CVC             
ICE052I 0 END OF DFSORT                                                         
Back to top
View user's profile Send private message
ppkumar66

New User


Joined: 10 Feb 2014
Posts: 10
Location: india

PostPosted: Wed Apr 02, 2014 6:44 pm
Reply with quote

i have split the code into two steps .earlier i tried if that can be done in single step.thanks all for your help

The below code is FYI

step 1
Code:

OPTION COPY                                     
INCLUDE COND=(01,4,ZD,EQ,6025,AND,             
              62,3,ZD,EQ,001,AND,               
              65,3,ZD,EQ,002,AND,               
              68,3,SS,NE,C'141,142,128,186',AND,
              68,3,ZD,GE,030)                   


Step2

Code:

OPTION COPY                                               
JOINKEYS FILE=F1,FIELDS=(71,22,A)                         
JOINKEYS FILE=F2,FIELDS=(71,22,A)                         
REFORMAT FIELDS=(F1:1,4000,F2:1,4000,?)                   
JOIN UNPAIRED,F1                                         
OUTREC IFTHEN=(WHEN=(8001,1,CH,EQ,C'1'),BUILD=(1,4000)), 
       IFTHEN=(WHEN=(8001,1,CH,EQ,C'B'),BUILD=(4001,4000))
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Apr 02, 2014 10:59 pm
Reply with quote

ppkumar66 wrote:
i have split the code into two steps .earlier i tried if that can be done in single step.thanks all for your help


Why do you think you need 2 steps? You are just going in circles about what you want.

1.If your input file matches the INCLUDE COND you want them in a seperate file even before the JOIN?

2. Do you exclude the records that match the INCLUDE COND for the Joinkey operation?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:

Back to Top