Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DFSORT/ICETOOL :: RE: How to use 2 input files in control control card

$
0
0
Author: magesh23586
Subject: Reply to: How to use 2 input files in control control card
Posted: Thu Oct 13, 2016 9:36 pm (GMT 5.5)

Assuming

Your Header or FILE1 has

Code:

----+----1----+----2
ON                 


OR

Code:

----+----1----+----2
OFF


OR

Code:

----+----1----+----2
TRAIL


And assuming LRECL=80

you may try below code.

Code:

//STEP01  EXEC PGM=SORT                                     
//SORTIN  DD DSN=FILE1,DISP=SHR                             
//        DD *                                               
FILE2                                                       
//        DD DSN=FILE2,DISP=SHR                             
//        DD *                                               
FILE3                                                       
//        DD DSN=FILE3,DISP=SHR                             
//        DD *                                               
FILE4                                                       
//        DD DSN=FILE4,DISP=SHR                             
//SORTOUT DD DSN=FILE5,DISP=(,CATLG,DELETE),SPACE=(CYL,(10,10),RLSE)
//SYSOUT  DD SYSOUT=*                                       
//SYSIN   DD *                                               
  OPTION COPY
                                               
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'OFF',OR,       
                            1,2,CH,EQ,C'ON',OR,             
                            1,5,CH,EQ,C'TRAIL'),             
                           PUSH=(81:1,5)),
                   
        IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'FILE2'),       
                           PUSH=(86:1,5)), 

        IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'FILE3'),       
                           PUSH=(86:1,5)),   
               
        IFTHEN=(WHEN=GROUP,BEGIN=(1,5,CH,EQ,C'FILE4'),       
                           PUSH=(86:1,5)) 
                 
  OUTFIL INCLUDE=(1,5,SS,NE,C'FILE2,FILE3,FILE4',AND,       
                  1,3,CH,NE,C'OFF',AND,                     
                  1,2,CH,NE,C'ON',AND,                       
                  1,5,CH,NE,C'TRAIL',AND,                   
         (81,10,SS,EQ,C'OFF  FILE2,ON   FILE3,TRAILFILE4')),

         BUILD=(1,80)                                       
                                                             

_________________
Regards,
Magesh


Viewing all articles
Browse latest Browse all 9405

Trending Articles