MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Split one record into many records

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
ramlak
Beginner


Joined: 17 Apr 2007
Posts: 27
Topics: 6

PostPosted: Tue Apr 24, 2007 3:42 pm    Post subject: Split one record into many records Reply with quote

HI,

I have a requirement to split one record into multiple records example

i have an input file
lrecl=900
Record layout for clarity have given you in vertical format for input file

1-30 xxx
31-42 required record(key)
42-49 dont bother
50 - 470 (occurs 28 times of length 15)
471-900 dont bother


Desired output,
lrecl = 15
1-15

1-occurence
2-occurence
.....
28-occurence.

any idea ?
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Apr 24, 2007 3:58 pm    Post subject: Reply with quote

I'm not sure if you want

o 15 bytes from somewhere in the first 42 bytes in the first record and each of the 28 occurrences in subsequent separate records, or
o just each of the 28 occurrences in separate records

Assuming it's the latter, you can use DFSORT control statements like this:

Code:

   OPTION COPY
   OUTFIL BUILD=(50,15,/65,15,/,80,15,...,/,
           ...,/,
           456,15)


/ means a new record.

Just fill in the ... for the 28 occurrences.

If you need 15 bytes from the first 42 bytes, just code them after BUILD=( with a / after them and then continue with 50,15,/ etc.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ramlak
Beginner


Joined: 17 Apr 2007
Posts: 27
Topics: 6

PostPosted: Tue Apr 24, 2007 4:12 pm    Post subject: Excellent Frank Reply with quote

What turn around time thanks a lot i was jus searching for building new records, just came to know its '\'

my requirement is exactly what you have assumed.


Thanks frank.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group