View previous topic :: View next topic
|
Author |
Message |
justjpr
New User
Joined: 03 Nov 2022 Posts: 36 Location: INDIA
|
|
|
|
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 |
|
 |
justjpr
New User
Joined: 03 Nov 2022 Posts: 36 Location: INDIA
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2218 Location: USA
|
|
|
|
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 |
|
 |
justjpr
New User
Joined: 03 Nov 2022 Posts: 36 Location: INDIA
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2218 Location: USA
|
|
|
|
An universal way to remove ANY ending comma might be
Code: |
... FINDREP=(INOUT=(C', ',C' ')) |
|
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1390 Location: Bamberg, Germany
|
|
|
|
Also have a look at
Code: |
.. JFY=(SHIFT=LEFT,PREBLANK=..,LEAD=..) |
|
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1390 Location: Bamberg, Germany
|
|
|
|
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 |
|
 |
|