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 RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am


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