|
View previous topic :: View next topic
|
| Author |
Message |
shobanreddy
New User
Joined: 20 Dec 2005 Posts: 3
|
|
|
|
Hi ,
I have GDG with 50k records and want to copy records to PS file from postion 333 upto 12 bytes as below
| Code: |
//TOOLIN DD *
COPY FROM(INPUT1) TO(OUTPUT1) USING(CTL1)
/*
//CTL1CNTL DD *
INCLUDE COND=(333,12,SS,EQ,C'017137610001',OR,
333,12,SS,EQ,C'017127830002',OR,
333,12,SS,EQ,C'017137630001',OR,
333,12,SS,EQ,C'074135740002')
|
But is there anyway to change string - C'017137610001' dynamically or generate dynamically INCLUDE COND ..
Regards
TSR |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
| Back to top |
|
 |
elango_K
New User
Joined: 18 Aug 2011 Posts: 44 Location: India
|
|
|
|
Using SYMNAMES is an option.
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.
| Code: |
//SYSIN DD *
OPTION COPY,SKIPREC=1,STOPAFT=1
INREC BUILD=(C'KEYVAL,C',C'''',22,15,C'''',80:X)
|
Use the generated symbol name in the next step:
| Code: |
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,3,CH,EQ,KEYVAL),OVERLAY=(5:C'DATA INCLUDED'))
|
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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. |
|
| Back to top |
|
 |
shobanreddy
New User
Joined: 20 Dec 2005 Posts: 3
|
|
|
|
Thanks for your response.
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.
Thanks
Shoban |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
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.
If you can answer the above, it will help. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|