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

split a variable record length file into two or more files


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sri.mainframes

New User


Joined: 16 Feb 2006
Posts: 29
Location: MUMBAI

PostPosted: Tue Jun 27, 2006 6:39 pm
Reply with quote

A file having 10000 variable length records consisting of 100 lrecl, 200 lrecl, 300 lrecl. Now i wanted to copy 100 lrecl into a file , 200 lrecl into another file. can anyone suggest the possible cases to solve this problem
by using cobol and as well as jcl.


regards,
Prince.Sri
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Jun 28, 2006 5:00 pm
Reply with quote

Prince,

You just check the first 4 byte value it will give you the length & put the simple evaluate stmt to write it to different o/p file.

01 file-rec.
05 file-length pic s9(4) comp.
05 file-field pic x(1000).

Procedure division.

Evaluate file-length
when 100
write file-a
when 200
write file-b
....

End-evaluate.

Hope it will helpful
Back to top
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Fri Jun 30, 2006 11:47 am
Reply with quote

Is the above problem can be solve by JCL?
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Tue Jul 04, 2006 1:19 pm
Reply with quote

Hey,

Post this topic in IBM SORT /ICETOOL section;if u want a solution thru JCL..

-Han
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
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 Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top