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

Simplify SORT CARD to combine INREC and OUTREC


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

New User


Joined: 03 Nov 2022
Posts: 36
Location: INDIA

PostPosted: Tue Jun 24, 2025 9:55 pm
Reply with quote

Input :
Code:

----|----1----|----2----|----3----|----4----|----5----|----6----|----7----|----8
HLQ1.Q2ABC.Q3.DATASET1,                          FB   00080           01   
HLQ1.Q2.Q3.DATASET2,                             FB   00154           02
HLQ1.Q2.Q3XY.DATASET3,                           VB   01112           03                                                   

Output :
Code:

----|----1----|----2----|----3----|----4----|----5----|----6----|----7----|----8
//DD01 DD DSN=HLQ1.Q2ABC.Q3.DATASET1,DISP=SHR
//DD02 DD DSN=HLQ1.Q2.Q3.DATASET2,DISP=SHR   
//DD03 DD DSN=HLQ1.Q2.Q3XY.DATASET3,DISP=SHR                                                                                                                   

Control Card :
Code:

//CTL4CNTL    DD *                                                                                                       
   INREC  BUILD=(C'//DD',71,2,C'  DD DSN=',1,45,C'DISP=SHR')
   OUTREC BUILD=(1,16,17,51,SQZ=(SHIFT=LEFT))             
/*                                                                 

I have prepared this control card which works perfectly in ICETOOL. I used squeeze to remove spaces between dataset name and 'DISP=SHR'.
FYI. scale is given to understand the position easily.

I am sure that either INREC or OUTREC suffice. I tried to to do it, but couldn't. Hence completed this functionality with both. Please help to do it with either INREC or OUTREC; I want to learn. Thank you.
_________________
JPrakash Irumbuliyur
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 36
Location: INDIA

PostPosted: Tue Jun 24, 2025 10:02 pm
Reply with quote

Code:

----|----1----|----2----|----3----|----4----|----5----|----6----|----7----|----8
//DD01 DD DISP=SHR,DSN=HLQ1.Q2ABC.Q3.DATASET1
//DD02 DD DISP=SHR,DSN=HLQ1.Q2.Q3.DATASET2   
//DD03 DD DISP=SHR,DSN=HLQ1.Q2.Q3XY.DATASET3                                     


This can also be done with out squeeze, but need to remove trailing ','. Please help to write that CONTROL card too.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2218
Location: USA

PostPosted: Tue Jun 24, 2025 10:31 pm
Reply with quote

justjpr wrote:
Code:

----|----1----|----2----|----3----|----4----|----5----|----6----|----7----|----8
//DD01 DD DISP=SHR,DSN=HLQ1.Q2ABC.Q3.DATASET1
//DD02 DD DISP=SHR,DSN=HLQ1.Q2.Q3.DATASET2   
//DD03 DD DISP=SHR,DSN=HLQ1.Q2.Q3XY.DATASET3                                     


This can also be done with out squeeze, but need to remove trailing ','. Please help to write that CONTROL card too.


Take a look at the CHANGE=(...) sub-parameter of the BUILD= parameter.
Back to top
View user's profile Send private message
justjpr

New User


Joined: 03 Nov 2022
Posts: 36
Location: INDIA

PostPosted: Tue Jun 24, 2025 10:42 pm
Reply with quote

sergeyken wrote:
Take a look at the CHANGE=(...) sub-parameter of the BUILD= parameter.
Thanks, I'll try and let you know.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2218
Location: USA

PostPosted: Tue Jun 24, 2025 11:08 pm
Reply with quote

An universal way to remove ANY ending comma might be
Code:
 ... FINDREP=(INOUT=(C', ',C'  '))
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1390
Location: Bamberg, Germany

PostPosted: Wed Jun 25, 2025 1:14 am
Reply with quote

Also have a look at
Code:
.. JFY=(SHIFT=LEFT,PREBLANK=..,LEAD=..)
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1390
Location: Bamberg, Germany

PostPosted: Wed Jul 02, 2025 9:56 am
Reply with quote

Code:
INREC BUILD=(C'//DD',SEQNUM,2,ZD,5X,                       
             1,44,JFY=(SHIFT=LEFT,LEAD=C'DD DISP=SHR,DSN=',
                       PREBLANK=C',',LENGTH=69))           
END
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 Sort card to generate the DSN DFSORT/ICETOOL 17
No new posts Sort card to know that creation date ... DFSORT/ICETOOL 10
No new posts Sort to insert record in an empty file. DFSORT/ICETOOL 5
No new posts Partial Sort conditions for PD fields DFSORT/ICETOOL 16
No new posts Help with SORT - I need to validate d... DFSORT/ICETOOL 11
Search our Forums:


Back to Top