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
 

 

Knowing RBA value before write

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
senthils

Active User


Joined: 15 Nov 2005
Posts: 117
Location: Chennai, India

PostPosted: Tue Dec 01, 2009 11:45 am    Post subject: Knowing RBA value before write
Reply with quote

hi,

using COBOL program, is there any possibility of knowing the RBA value of an ESDS file before actually doing a write on that file.


note:
I am not sure whether i should be posting it in this forum or in COBOL section.
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 01, 2009 12:12 pm    Post subject:
Reply with quote

Writing is always to the end of the file, no need to know the RBA.
Reading is a different story, you can do that direct (supply RBA) or
sequential.
Back to top
View user's profile Send private message
senthils

Active User


Joined: 15 Nov 2005
Posts: 117
Location: Chennai, India

PostPosted: Tue Dec 01, 2009 12:17 pm    Post subject:
Reply with quote

My requirement is that if the RBA goes beyond a certain value then I have to write into another file.

I know i can get the RBA value after the write command is executed, but my coding logic will become easy if i can know the RBA value before writing.

So is there any possibility?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 01, 2009 12:31 pm    Post subject:
Reply with quote

Is this a continuation of the other thread that you started ?
Back to top
View user's profile Send private message
senthils

Active User


Joined: 15 Nov 2005
Posts: 117
Location: Chennai, India

PostPosted: Tue Dec 01, 2009 12:33 pm    Post subject:
Reply with quote

Yes. But i thought this will fall under a separate topic since this is more of a COBOL command which i am looking for.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Tue Dec 01, 2009 12:46 pm    Post subject: Reply to: Knowing RBA value before write
Reply with quote

after the write
check for limit minus max_reclen
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 01, 2009 12:49 pm    Post subject:
Reply with quote

Well, think about it. The situation that you find yourself in for asking this topic is explained in the previous topic, so for people to really know what is happening they will need to know to read another post.

Now we are looking at changing a program to write to either one of N files. What about the implications of this, as if you have one logical file spread over two physical ESDS then you will need to change every other program that reads the ESDS as you can not concatenate VSAM files to a single DD.

If you need to make a program change, why not spend the time and effort in getting the original program to work properly rather than creating a new monster to deal with at a later date.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Dec 01, 2009 1:04 pm    Post subject:
Reply with quote

Why can't you just rely on the error codes you would receive when you try to write a record and there is no more room?

not only would you be saved the computation before every write,
but you would have the trap at the correct place.

also, sounds as if you need an index to the multiple vsam files,
which you could update upon receiving the end-of-file error.
Gee, you could have n-number of vsam files.
Back to top
View user's profile Send private message
senthils

Active User


Joined: 15 Nov 2005
Posts: 117
Location: Chennai, India

PostPosted: Tue Dec 01, 2009 1:05 pm    Post subject:
Reply with quote

hi expat,

This is a COBOL CICS environment. The programs already have been coded to take care of reading multiple ESDS files.

I am just coding a patch to take care of max RBA scenario. Thats why i wanted to know is there are any COBOL CICS command to know the RBA value before writing.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7930
Location: Bellevue, IA

PostPosted: Tue Dec 01, 2009 4:16 pm    Post subject:
Reply with quote

How is CICS supposed to know how long a file is until it attempts to write to it? Answer: as expected, it cannot. You can capture the RBA or XRBA upon doing the WRITE but I'm not aware of any commands that will tell you the high used RBA in CICS without doing the WRITE.
Back to top
View user's profile Send private message
senthils

Active User


Joined: 15 Nov 2005
Posts: 117
Location: Chennai, India

PostPosted: Tue Dec 01, 2009 4:22 pm    Post subject:
Reply with quote

Thanks everyone for your quick replies. I will modify the logic of my program accordingly.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Compare 2 files & write Indicator... nagendrapgupta SYNCSORT 5 Sun May 15, 2016 10:42 am
No new posts DFSORT to match two files and write John F Dutcher DFSORT/ICETOOL 6 Thu May 12, 2016 5:17 pm
No new posts Write a job to delete the files aging... Abhinav Roy JCL & VSAM 4 Fri Dec 18, 2015 7:17 pm


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