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

Copying sets of records.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Tue Sep 20, 2011 8:52 am
Reply with quote

Hi,

My input data (LRECL=80, RECFM=FB) appears as shown below:

Code:

----+----1----+----2----+----3
01XX8    XXXXX8GIMS   
02XX8    XXXXX813SALT 
14XX8    XXXXX811022051
15XX8    XXXXX831001102
99XX8    XXXXX8
01X18    XXXX18GIMS   
02X18    XXXX1823GILT 
99X18    XXXX18
01118    XXX118GIMS   
02118    XXX11813SALT 
14118    XXX11811022051
15118    XXX11831001102
99118    XXX118


I would like to copy all those sets of records that have '13SALT' appearing at 16th position on 02 type record.

Expected Output:

Code:

01XX8    XXXXX8GIMS   
02XX8    XXXXX813SALT 
14XX8    XXXXX811022051
15XX8    XXXXX831001102
99XX8    XXXXX8
01118    XXX118GIMS   
02118    XXX11813SALT 
14118    XXX11811022051
15118    XXX11831001102
99118    XXX118


Applying the logic suggested by superk in my previous post (it had worked for that requirement though) does not get me the full results and omitting 01 type on 1st set of records !!

Please help.

Thanks.
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Tue Sep 20, 2011 11:05 am
Reply with quote

Quote:
I would like to copy all those sets of records that have '13SALT' appearing at 16th position on 02 type record.


Why new topic, could have continued on prior post.

Is it a new requirement.

Quote:
I would like to copy all those sets of records that have '13SALT' appearing at 16th position on 02 type record.


You haven't answered yet for NIC's question. What do you mean by set of records (Is it 02 14 15 and 99) and what if 02 hasn't 14 & 15 as you shown in sample input

Code:
01X18    XXXX18GIMS   
02X18    XXXX1823GILT
99X18    XXXX18
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Tue Sep 20, 2011 12:29 pm
Reply with quote

Take a look here. It is similar to your requirement.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top