Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

vsam to gdg

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
saru

New User


Joined: 17 Feb 2005
Posts: 4

PostPosted: Fri Feb 18, 2005 2:39 pm    Post subject: vsam to gdg
Reply with quote

hai!
can any body send me the solution of the following:

i have a Vsam KSDS file 'FILE1', with 10000 records, each having some fields, one of the field is 'FIELD1' of size 10 bytes.

and now i want to read that ksds file records and search for 'indic' string . (this 'indic' is located in last 5 bytes of the 'FIELD1' variable.)

so if u find that in any record then write that record in to other o/p file(gdg), else write in to empty file.

consider it as urgent
with thanks
saru
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Fri Feb 18, 2005 10:35 pm    Post subject:
Reply with quote

You can use DFSORT to do this. DFSORT can always process a KSDS as TYPE V. DFSORT can process a KSDS as TYPE F if all of the records are the same length.

Let's assume the string you want to check starts in data position 21.

With TYPE V processing, the starting position would be 25 (21 + 4 for the RDW that DFSORT uses) and you could use this DFSORT job to write only the records with the given string to the output data set:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   VSAM input file
//SORTOUT DD DSN=...  VB output file
//SYSIN DD *
   OPTION COPY
   RECORD TYPE=V
   INCLUDE COND=(25,5,CH,EQ,C'indic')


With TYPE F processing, the starting position would be 21 and you could use this DFSORT job to write only the records with the given string to the output data set:

Code:

//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   VSAM input file
//SORTOUT DD DSN=...  FB output file
//SYSIN DD *
   OPTION COPY
   RECORD TYPE=F
   INCLUDE COND=(21,5,CH,EQ,C'indic')


For more information on processing VSAM data sets with DFSORT, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/1.8.3.4?SHELF=&DT=20050120082820&CASE=

I don't know what you mean by "else write in to empty file.". You need to explain what you mean by this if you want more help. Showing an example of your input recoreds and what you expect for output would be a good way to clarify what you need.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 4 Wed Jan 11, 2017 6:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us