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

Reformat the file using first 4 records as 1 record


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

New User


Joined: 18 Nov 2008
Posts: 7
Location: Worcester

PostPosted: Mon Dec 15, 2008 10:15 pm
Reply with quote

Hi ,

I have a input file with 10 bytes FB length. It has 200 records like below.

0123456789
abcdefghijkl
9876543210
lkjihgfedcba
.....
......
....
1234567890

I need the output file of length of 40 bytes FB length.
First 4 records as 1 record in output file.
Next 4 records as 2 record in output file.

0123456789abcdefghijkl9876543210lkjihgfedcba
.............

Could you please help me on this.

Thanks in advance.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Mon Dec 15, 2008 10:23 pm
Reply with quote

If the BLKSIZE is n*40, the quick and dirty method is to override INPUT LRECL=40 rather than 10 on a copy utility. Output is also LRECL=40.

Four records will be read as one record.
Code:
//SYSUT1 DD DSN=your.file,DISP=OLD,LRECL=40
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Dec 15, 2008 10:26 pm
Reply with quote

singaiah,

Check the smart DFSORT trick "Combine multiple records into one record" . It has job for combining four 10 byte records into a 40 byte record:

www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
Singaiah

New User


Joined: 18 Nov 2008
Posts: 7
Location: Worcester

PostPosted: Tue Dec 16, 2008 1:12 am
Reply with quote

Thank you so much for your help on this.
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 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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
Search our Forums:

Back to Top