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

Copy records form GDG to PS file - INCLUDE COND


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

New User


Joined: 20 Dec 2005
Posts: 3

PostPosted: Wed Feb 29, 2012 6:34 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 29, 2012 6:38 pm
Reply with quote

see
www.ibmmainframes.com/viewtopic.php?t=57587&highlight=jp1

for the use of the JP1 construct
Back to top
View user's profile Send private message
elango_K

New User


Joined: 18 Aug 2011
Posts: 44
Location: India

PostPosted: Wed Feb 29, 2012 9:58 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 01, 2012 12:58 am
Reply with quote

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
View user's profile Send private message
shobanreddy

New User


Joined: 20 Dec 2005
Posts: 3

PostPosted: Sat Mar 03, 2012 9:11 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Mar 03, 2012 10:43 pm
Reply with quote

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
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top