Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Position BSAM file on multi volume

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
lbjerges

New User


Joined: 21 Aug 2013
Posts: 2
Location: Sweden

PostPosted: Thu May 07, 2020 8:13 pm    Post subject: Position BSAM file on multi volume
Reply with quote

Hi!
We have a in-house written checkpoint/restart framework that uses NOTE and POINT macros to keep track of sequential file positioning. The NOTE values are stored, along with sufficient file information in a DB2 table. This has been working OK for input and output FB and VB files as long as the files are residing on one volume.
My problem is as follows:
When the files are allocated on multiple volumes, which may be the case for "regular" files and, in our case, also for zEDC encrypted files There is a problem when I need to position a restart point on another volume than the first. Note that the zEDC files are single stripe which, I believe, means that they behave in the dame manner as regular multi volume files as oppose to if they were multi striped in which case the NOTE macro would return a relative block number that, from what I believe, could be used directly in a POINT macro to position the file in the correct place.
My problem is that I, after trying to search IBM Manuals a lot, have not found a clue on how to position my files on the correct volume. This prereq on the other hand, I have found referenced in more than on place in the documentation. If I only do a POINT macro with the value returned from the stored return of the corresponding NOTE macro it will by default be positioned on the first volume.
The "hard" way would be to, for an input file, open it in input mode and read blocks until I have "spilled over" on the proper relative volume then do the POINT and for an output file open it in INPUTOUTPUT mode and basically do the same thing and then start to write from that position.
This, I think is not very nice programming so I would think that there must be a better way to:
o Position to the proper volume
o Issue the POINT macro
o Go about "business as usual".
Does anybody have an idea on how to go about accomplishing this?

Than you in advance, Lars
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 860
Location: The Universe

PostPosted: Thu May 07, 2020 11:16 pm    Post subject:
Reply with quote

I carefully read the discussion of NOTE in z/OS DFSMS Macro Instructions for Data Sets. The discussion mentions multiple volumes only in the context of "current volume." In other words - and I'm only guessing here - your program must append knowledge of the current volume to the output from NOTE and, before the POINT macro, switch to the appropriate volume and then POINT to the record. I truly wish I could be more helpful, but I have to admit I've never used NOTE/POINT so I have no experience to back up my guess.

If possible, please let us know how this turns out.
Back to top
View user's profile Send private message
lbjerges

New User


Joined: 21 Aug 2013
Posts: 2
Location: Sweden

PostPosted: Fri May 08, 2020 9:18 am    Post subject:
Reply with quote

Thanks Steve.
I know (I guess), I came to the same conclusion when reading the manual but the problem is the phrasing "switch to the appropriate volume". That phrase is mentioned in different places but I have not found any reference on how to do it.
Currently I have activated an end-of-volume exit on the DCBs from which I retrieve the relative volume number, the first being zero, the next one and so on. My crude logic as of now is to, for an input file:
o Open it
o Read blocks until I hit the same relative volume number as in the checkpoint e.g. #1
o Do the POINT
o Carry on reading to process
But I would imagine that there should be a more direct and logical way just to position on a specific volume.

Regards Lars
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 860
Location: The Universe

PostPosted: Fri May 08, 2020 9:41 am    Post subject:
Reply with quote

I've put some more thought about this.

I recall thinking about this as a generic problem years and years ago. Don't ask how many years, please. I do know - then - that I never came to any real conclusions, so I guess it was beyond my limited knowledge then.

The topic starter failed to mention whether the data set was on disk or tape. My discussion here is limited to disk. Tape presents more difficulties.

Now I mentioned that you have to append volume information to the value you get from NOTE. This still goes. The TS talked about doing a volume switch. I think this may be what stopped me years and years ago. Years and years ago was before dynamic allocation or maybe I didn't know how to achieve this effect. With dynamic allocation you can define each volume as a separate data set, open each volume as though it were a separate data set. You do the volume switch by selecting the appropriate DCB.

You use the DALDSSEQ key to specify the volume. There is JCL to achieve an equivalent effect. I think you have to work this way, clumsy as it sounds, because I'm pretty sure it will work with data sets defined on SMS managed volumes, where SMS data sets can't be allocated directly by volume, which was first thought about tackling this problem.

Now I think this will work, but I've never tried it, so take my thoughts as a possible approach, nothing more. Good luck!
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Hex Value - vb file replace old date ... premnath DFSORT/ICETOOL 10 Sat Oct 17, 2020 3:15 am
No new posts Related to using a file in comparison Kumar Sandeep JCL & VSAM 4 Fri Oct 16, 2020 5:30 pm
No new posts Creating a single-record file with CO... Joerg.Findeisen DFSORT/ICETOOL 8 Tue Oct 06, 2020 8:19 pm
No new posts Altering output file attributes f8ful All Other Mainframe Topics 5 Tue Oct 06, 2020 4:07 pm
No new posts Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 16 Sun Sep 13, 2020 3:38 am

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us