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

How to use 2 input files in control control card


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Fri Oct 14, 2016 2:05 am
Reply with quote

Magesh has realized the wasting of resources and came up with this solution as per point#2 from my post.
Code:
//CPYJK EXEC PGM=ICETOOL                   
//TOOLMSG DD SYSOUT=*                       
//SYSOUT DD SYSOUT=*                       
//DFSMSG DD SYSOUT=*                       
//IN1 DD DISP=FILE1,DISP=SHR               
//OUT2 DD SYSOUT=*                         
//TOOLIN DD *                               
  COUNT FROM(IN1) NOTEMPTY RC4 USING(CTL1) 
  COUNT FROM(IN1) NOTEMPTY RC8 USING(CTL2) 
/*                                         
//CTL1CNTL DD *                             
  INCLUDE COND=(1,3,CH,EQ,C'OFF')           
//CTL2CNTL DD *                             
  INCLUDE COND=(1,2,CH,EQ,C'ON')           
//COND1  IF RC = 04 THEN                   
//SORT01  EXEC PGM=SORT                     
//SORTIN  DD DISP=FILE2,DISP=SHR           
//SORTOUT DD DISP=(,CATLG,DELETE),         
//           SPACE=(CYL,(10,10),RLSE),     
//           DSN=FILE5       
//SYSOUT  DD SYSOUT=*                   
//SYSIN   DD *                           
  OPTION COPY                           
//     ENDIF                             
//COND2  IF RC = 08 THEN                 
//SORT02  EXEC PGM=SORT                 
//SORTIN  DD DISP=FILE3,DISP=SHR         
//SORTOUT DD DISP=(,CATLG,DELETE),       
//           SPACE=(CYL,(10,10),RLSE),   
//           DSN=FILE5                   
//SYSOUT  DD SYSOUT=*                   
//SYSIN   DD *                           
  OPTION COPY                           
//     ENDIF                             
//COND3  IF RC = 00 THEN                 
//SORT03  EXEC PGM=SORT                 
//SORTIN  DD DISP=FILE4,DISP=SHR         
//SORTOUT DD DISP=(,CATLG,DELETE),       
//           SPACE=(CYL,(10,10),RLSE),   
//           DSN=FILE5     
//SYSOUT  DD SYSOUT=*     
//SYSIN   DD *           
  OPTION COPY             
//     ENDIF           
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 14, 2016 2:30 am
Reply with quote

thanks &deity

sometime it is necessary to use borderline methods - locking a topic -
to make people understand that they are on the wrong path

by the way
Quote:
one should be submissive and obliged by accepting the way they advise us


I do not pretend submission, just consideration for the experience we share icon_wink.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Oct 14, 2016 7:54 pm
Reply with quote

My apologies for posting on a locked one. Just thought of sharing something that came to me.
Code:
//STEP01   EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD DSN= Input control data set (FB/80) : (ON/OFF/TRIAL)                                         
//SORTOUT  DD DSN=&C1,DISP=(NEW,PASS),SPACE=(TRK,(1,1)) 
//SYSIN    DD *                                         
  OPTION COPY                                           
  INREC FINDREP=(INOUT=(C'OFF',C'FROM(IN1)-',           
                        C'ON',C'FROM(IN2)-',             
                        C'TRIAL',C'FROM(IN3)-'),ENDPOS=5)
/*                                                       
//STEP02   EXEC PGM=ICETOOL                             
//TOOLMSG  DD SYSOUT=*                                   
//DFSMSG   DD SYSOUT=*                                   
//IN1      DD DSN= Input data set1                                         
//IN2      DD DSN= Input data set2                   
//IN3      DD DSN= Input data set3                 
//OUT      DD DSN= Output data set
//TOOLIN   DD *               
  COPY -                     
//         DD DSN=&C1,DISP=SHR
//         DD *               
  TO(OUT)                     
//*
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 14, 2016 8:03 pm
Reply with quote

nothing to worry about that,
it' s one of the privileges of the moderators icon_wink.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 0
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top