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

Using the file with U format in the CObol program


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

New User


Joined: 10 Jul 2006
Posts: 7
Location: Bangalore

PostPosted: Thu Nov 09, 2006 3:11 pm
Reply with quote

Hi,

I have on CICS journal file (online). There is one job which downloads the file with U format (Sequential) into the GDG. Now my requirement is to read the records from that GDG write a report as per the logic. I don't know how to read the U format file through COBOL program.

Please help me.
Back to top
View user's profile Send private message
premnath.mls

New User


Joined: 16 Aug 2006
Posts: 9

PostPosted: Thu Nov 09, 2006 6:15 pm
Reply with quote

HI..

you need to do the same as you do for 'v' format...i.e., you have specify your logical record length(lrecl) in jcl or 'record contains' in the file section of your program as your (larger record length + 4 bytes).

for e.g.,


if you have various record length as 80 and 60..you have to specify like

file section.
fd file1.
record contains 84.

......please correct me if i was wrong
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Nov 10, 2006 5:30 am
Reply with quote

Hi,

Format U recs don't use RDWs so there's no extra bytes required. The drawback is that the data in the block can't be accessed individually as recs in FB and VB files.

You must use record is varying from x to y depending on ws-len.
After each read ws-len will contain the length of the block just read.

If you write a U rec put its length in ws-len before the writ.
Back to top
View user's profile Send private message
premnath.mls

New User


Joined: 16 Aug 2006
Posts: 9

PostPosted: Fri Nov 10, 2006 11:33 am
Reply with quote

hi there,

i am sorry for the wrong answer...and thankyou for your right approach...for the problem stated above..
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Nov 11, 2006 6:20 am
Reply with quote

No apology required. We're all trying to be of help. Hopefully, with discussion like this we find the solution.
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 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
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top