Input Records delimited by Comma -1 row heading for reference only. data doesnt have 1st row.
PACKAGE,MEMBER,LIBRARY,OWNER,QUALIFIER,REPLVER
PRODEH,CLMADJ,ABC.AA.XYZ.XXX,SCOTT,DB2T1A,2011-01-01-12.34.56.123456
PRODEH,CLMPAYBL,ABC.AA.XYZ.YYY,WILSON,DB2T1A,2012-01-01-12.34.56.123456
where PACKAGE is fixed length =6
MEMBER variable length 5 to 8 (max)
LIBRARY fixed length =14
OWNER variable length 5 to 8 (max)
QUALIFIER - 6 length (Fixed)
REPLVER - 26 char fixed
Following output records comes from input. Rest all are hardcode.
PACKAGE
MEMBER
LIBRARY
OWNER
QUALIFIER
REPLVER
For Output record the 2nd column like LIBRARY,QUALIFIER,DEFER,FLAG etc can be started from position 25.
Max length of output record is 72.
Any help is appreciated !
why not try Yourself, the requirement is pretty similar to this one
www.ibmmainframes.com/viewtopic.php?t=56189&highlight=
that You posted Yourself and for which You received a solution
the logic of which can be applied to the problem in this topic.
why not try Yourself, the requirement is pretty similar to this one
www.ibmmainframes.com/viewtopic.php?t=56189&highlight=
that You posted Yourself and for which You received a solution
the logic of which can be applied to the problem in this topic.
Hi Enrico,
Yes i did have a look at my previous solution. BUt I'm unable to unstring it. Reason: Input has comma delimited and position varies for different parameters based on other values. So I'm not sure how to get out of it.
I thought abt PARSE also, but some of input records are of variable length and for PARSE command we need to provide FIXLEN or other which is not my case.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
The FIXLEN is for the maximum length of a field. All PARSEd fields are fixed length. Each value in the field will be the same size, some will be padded with trailing space.
Code:
A,12345,B
A,1234567,B
If you PARSE ending at the commas and with FIXLENs of 1, 7 and 1 you will get
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
sarbamrit wrote:
I thought abt PARSE also
stop thinking about it and read about it.
there are parameters that you can use, so that
avoid using fix position notation
allow for variable length records
of course you could always search the board
(lotta effort, i know
but today's Good Friday in the states
and i imagine Frank and Kolusu are taking a much deserved break.)
The FIXLEN is for the maximum length of a field. All PARSEd fields are fixed length. Each value in the field will be the same size, some will be padded with trailing space.
Code:
A,12345,B
A,1234567,B
If you PARSE ending at the commas and with FIXLENs of 1, 7 and 1 you will get
Code:
A12345 B
A1234567B
Yes.
My case is say in case of MEMBER(ABC123). I can also have MEMBER(ABC1234) or MEMBER(ABC12345). The issue of NOT using PARSE is FIXLEN need to be provided.
Code:
MEMBER(ABC123)
will become
Code:
MEMBER(ABC123 )
Code:
MEMBER(ABC1234)
will become
Code:
MEMBER(ABC1234 )
Code:
MEMBER(ABC12345)
will become
Code:
MEMBER(ABC12345)
whereas I dont want any spaces before my closing bracket.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
sarbamrit,
You are building BIND cards and the parameters can be on different lines , you don't have to club parameters on to a single line. The output file should be 80 bytes and not 72 bytes. Use the following DFSORT JCL
Thank you Kolusu for the complete solution.
I would also like to say 'Thank you' to Enrico, Bill and Dick for putting their time in guiding and providing solutions.