Generate the values as showed below and use them in you include.
The example showed below is to create the SYMNAMES records based on the input and the created value is used in include statement in the next step.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
But is there anyway to change string - C'017137610001' dynamically or generate dynamically INCLUDE COND.
You need to do a better job of explaining what exactly you want to do. You can certainly generate an INCLUDE statement from values in another file with DFSORT - is that what you want to do? If so, give more details of what the other file looks like (RECFM, LRECL, starting position and length of fields, etc).
If you want to do something else, explain clearly what you want to do. Show examples of input and expected output.
CARD file - Record format : VB Record length : 133
filed length is 12 bytes and starting at 1st postion as below.
=COLS> ----+----1--
000001 824711900001
000002 017137610001
000003 112689430002
000004 219443680001
000005 116837910003 ...etc
INPUT file - GDG having 50 k records.
Record format: VB ,Recordlength : 32756
OUTPUT file - PS - file attributes is same is out file.
I want to copy records from GDG to PS file which is equal to C'017137610001'... etc fromstarting postion 333 upto 12 bytes length.
So want change the value in the INCLUDE statement - C'017137610001' from run to run.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
It does not make any difference to the control cards that one of your input files is a GDG.
Can we assume that the 333 for 12 is in the fixed part of all the records? And it is not overlapping other fields on other record-types which might get a false record?
If the file is already sequenced on 333 for 12, then a JOINKEYS would work well.
If the order of the output file does not matter, a JOINKEYS would again suit.
If you want the output in the same order as the input then generating the INCLUDE cards would be one way.