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
 

 

Reformat the file using first 4 records as 1 record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Reformat the file using first 4 records as 1 record
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    Post subject:
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    Post subject:
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:

http://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    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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