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
 

 

Using the file with U format in the CObol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Using the file with U format in the CObol program
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    Post subject:
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    Post subject:
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    Post subject: sorry
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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