View previous topic :: View next topic
|
Author |
Message |
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What happened when you tried this for yourself ? |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Q: What will happen if do not specify a dataset sequence number while copying a dataset to tape ?
A: The default is 1.
Q: Is there any advantage in specifying it ?
A: Not if it is the first. Obviously you need to specify the number if not first.
Q: Why should anyone care if the dataset gets written as the 1st dataset in a volume or 65536th as long as he/she is able to retrieve it later on ?
A: You wouldn't. But of course there has to be a good reason for writeing multiple datasets to a tape. And if the datasets end up spanning tapes, then it gets complicated. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If you try and write your data set as data set 1 the guy who has data currently as data set 1 will not be very happy. And nor will you be when you are booted out. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Now there are a few things you have to watch out for.
- Advantages? Yes. Potentially. Many times you have tape volumes with just a few records on the tape. By writing many data sets onto a tape, you can use the tape resource more efficiently. Now that most shops use virtual tape you just have a bunch of pseudo tape volumes and it's not so critical any more.
- Why should you care? That's actually rather complex. Obviously if you want to open data set 50 it will take longer than if you want to open data set 1. Or if you need to use data set 30 and data set 50 at the same time it ain't gonna work! You can only open one data set at a time on one tape volume.
- Knowledge about the data set sequence number. If you catalog the data set, the data set sequence number is stored in the catalog entry. Systems that create multiple data sets on a tape volume such as, for example, DFSMS, keep the data set sequence number in its private catalog. If you have to know the sequence number manually, you may be cruisin' for a bruisin'.
- Don't specify the sequence number? It uses sequence number 1, unless you're retrieving a cataloged data set, when it uses the sequence number in the catalog.
- Miscellaneous. Unless you set up your JCL and program very carefully, you will have performance issues. Data management frequently rewinds a tape volume when you close a data set, or even worse, rewinds and unloads the tape volume so the operator has to remount the volume if you're going to write another data set. If you're writing one data set at a time this is a reasonable thing to do, but not if you're writing several data sets to the volume. There are things you can do in your program and JCL to persuade the system to keep the volume online, but they're not a "natural" thing to do. Another issue if you are stacking the data sets over multiple steps, you will find the system will unload a volume so the drive can be assigned to another job. There is nothing you can do in JCL to require the system to keep the volume on the drive until end of job, ...
One final comment. In the 1980s I worked for a shop that had a local modification to make stacking data sets on tape rather easy. In 1990 they were rolling out these changes, and we discovered no one actually used this facility! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
After further consideration, with the advent of virtual tape why would you want to use labels.
The last site that I worked banned the use of multi label tapes once the VTS was installed. Using "Virtual" you can increase the number of drives available to allow concurrent writing, or use UNIT=AFF= if for some reason your site doesn't wish to increase the number of virtual drives available.
Again with virtual technology you have the opportunity to greatly expand the number of logical tape volumes available to use without the need for anywhere near so many physical volumes. |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
Thank you all for your responses !
I think I understand this better now.
Does anyone have an example of using SEQUENCE(sequence number) along with BPXWDYN ?
I tried different ways. But when I run it I always get result = -32
Code: |
call bpxwdyn("alloc da('"sysut2"') fi(sysut2)",
" new catalog close mount gdgnt msg(wtp) unit(auto)",
" label(SL)",
" sequence(0001)",
" dataclas(tapeonly)") |
www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb600/rda.htm
SEQUENCE(sequence number) Specifies the relative position (number) of a data set on a tape volume.
|
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
when i remove the sequence parameter, the allocation works file |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
i think keyword: POSITION works instead of SEQUENCE |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
Does anyone know if it is possible to 'stack' datasets to a tape volume using BPXWDYN ? I have been struggling with different keywords all day to try and make this work.
I could not find a way to get the Volume Serial number of the tape volume that the first dataset in a list is written to, so I can write the remaining datasets to the same volume, incrementing the dataset sequence number
I read that RTVOL(variable) is supposed to return the volume
But it did not, for me.
Is there any alternate way to do something similar to VOLUME=(,REF=*.STEPNAME) in BPXWDYN or some other dynamic allocation program, from a rexx ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
As i said, i have already checked the exact same manual that you pasted above.
I already tried all the options there. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
My guess is that the tape is only mounted when an OPEN is done, not at allocation time. So either do BPXWDYN INFO after the tape has been opened, or do a catalog lookup after the tape is closed. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
harisukumaran wrote: |
Does anyone know if it is possible to 'stack' datasets to a tape volume using BPXWDYN ? I have been struggling with different keywords all day to try and make this work.
|
Technically, yes. It's not desirable: You have to free the allocation if there is one (which unloads the tape) and reallocate the tape (another mount). You lose most of the advantages of stacking data sets.
Pros, writing in Assembler language, use a different technique. They use dynamic allocation to get the tape up, use CLOSE (dcb,LEAVE) to ensure CLOSE does not rewind the tape, and fiddle with the JFCB to write additional data sets.
harisukumaran wrote: |
I could not find a way to get the Volume Serial number of the tape volume that the first dataset in a list is written to, so I can write the remaining datasets to the same volume, incrementing the dataset sequence number
I read that RTVOL(variable) is supposed to return the volume
But it did not, for me. |
Assuming each file is cataloged, you get the volume list of the last data set after its allocation has been freed, and use the last volume in the volume list. I suspect this will be rather difficult in Rexx.
Do not forget I'm primarily an Assembler programmer; I have never used BPXWDYN. I do use MVS dynamic allocation, but it still surprises me from time to time.
POSITION / SEQUENCE. The TSO ALLOCATE command uses POSITION. Many times it seems BPXWDYN follows the TSO ALLOCATE command.
I suggest you read and understand every word in this paragraph. RTVOL - if it is documented. If it does not seem to work, then your best bet is to open a PMR with IBM. If nothing else they'll tell you what you are doing wrong. You realize it will only return the first volume, and not even that when you allocate the first data set on a volume without a volume serial. The volume is not actually known until the data set is actually opened. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Code: |
//SYSUT01 DD DSN=SAW162.JCLCHECK.DUMP0C4.JES2,DISP=(,KEEP),
// UNIT=TAPE,LABEL=(1,RETPD=999)
//SYSUT02 DD DSN=SAW162.JCLCHECK.DUMP0C4.SYSPRINT,DISP=(,KEEP),
// UNIT=TAPE,LABEL=(2,RETPD=999),
// VOL=(,RETAIN,REF=*.SYSUT01)
//SYSUT03 DD DSN=SAW162.JCLCHECK.DUMP0C4.SYSUDUMP,DISP=(,KEEP),
// UNIT=TAPE,LABEL=(3,RETPD=999),
// VOL=(,RETAIN,REF=*.SYSUT02)
|
As can be seen dataset sequencing is achieved by the LABEL parameter,
unloading and remounting is prevented by the RETAIN parameter.
Fooling around with the JFCB is only required when the sequence number will be above 4 decimal digits.
Anyone here that wants to write to tape more than 9999 datasets? |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Mr. Holland: the topic starter wants to use BPXWDYN exclusively. You're using JCL exclusively.
I suspect you want to catalog the data sets, not just keep them.
UNIT=TAPE on SYSUT02 and SYSUT03 is probably redundant as it is implied by the VOL=REF to a DD in the same step. I think I'm right about that, but it has been a decade or more since I dealt with any sort of tape.
When I talked about fiddling with the JFCB, I meant to update JFCBFLSQ (the file sequence number) and JFCBDSNM (the data set name). |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
As a matter of interest, I'd like to know the reason for wanting to use multi label tape volumes.
The only scenario I can think of is when data is sent to another site.
As I have said above, the use of VTS is sooooooo good, as I found out when I was a storage administrator, back in the good old days of being allowed to work on the z/OS beastie
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
The topic starter has to find out if the parameters can be used with bpxwdyn.
That was the approach of my comment.
The topic starter is absolutely not interested in JFCB handling as far as I can see.
Quote: |
UNIT=TAPE on SYSUT02 and SYSUT03 is probably redundant as it is implied by the VOL=REF to a DD in the same step. I think I'm right about that, but it has been a decade or more since I dealt with any sort of tape. |
I wouldn't know (just like you). It worked , as was the aim. |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
The reason I wanted to use dynamic allocation (not necessarily BPXWDYN) was because my requirement is to back up new generations of over a thousand GDGs on a nightly basis. If any of the backups fail, i do not want to abend the job but move on and backup the next new GDG. There may be multiple generations of any GDG on any given day. I update last succefully backed up g0000v00 for each gdg in a control file so I can start the backup from the next generation the next day.
If there is no way this can be done via dynamic allocation i have no option but to generate backup jcl dynamically every time and submit it and somehow keep track of the last backed up generation. |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
I was told that automated backups would require the dataset names to follow a pattern. Datasetsl names in my list do not have any naming pattern and so I need to develop this custom process. Also, my tape management person tells me that tapes backed up for extended periods of time need to be stacked with datasets. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
DFdss incremental backup does exactly what it says on the tin
You can select datasets by dataset mask, and also select only those that have not been previously backed up, so guess that would only leave new creations.
Please, please don't tell me that you were considering backing up each dataset to one label, please, just don't.
Have you investigated your storage management people, really great people , to see if the DASD management software can do this, products like DFhsm use around 95% of any tapes automatically stacking datasets and also keeps track of exactly where they are. DFhsm can also create duplex copies too, as can DFdss
Had you have described the requirement accurately at the START of this thread maybe a much better solution would have been found much faster |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
To me too this looks like a backup rather than a copy application. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
harisukumaran wrote: |
I was told that automated backups would require the dataset names to follow a pattern. Datasetsl names in my list do not have any naming pattern and so I need to develop this custom process. |
I think you'll find there is a pattern, if you look carefully. As expat says, ADRDSSU's data set matching capability is very flexible. The only advantage of your idea is recovery of the backed up data sets should be much easier than using ADRDSSU.
harisukumaran wrote: |
Also, my tape management person tells me that tapes backed up for extended periods of time need to be stacked with datasets. |
At one level I agree with your tape management person. Stacking is not as fast - even if done properly, which your BPXWDYN idea is not doing, as documented before, as you think. I recall - this was in 1989 or 1990 - watching an old style drive with round tapes. It would write normally for a few seconds, then stop, the drive seemed to backup the tape, read something, write something, then write normally for a second or two, and so on. It turned out it was DFHSM stacking migrated data sets to the tape. This pause between files was MVS data management starting a new file. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
Curious why would you want to backup GDG's which are effectively a backup anyway?
One easy way would be to use DFDSS DUMP that just takes all the datasets into a single backup dataset. (The only issue with this would be that it won't backup datasets that have been migrated/archived by DFHSM or similar.)
You can specify dataset name masks that would capture a lot of GDG names with a single line, and you can specify the relative generation numbers you want to capture. So specifying NAME(0) would only backup the latest generations. You can also refine the selection further if you want to using the BY selection criteria as well to check on things like creation date, last reference date and change flags.
e.g.
//DUMP EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN=BACKUP.DUMP(+1),DISP=(,CATLG),
// UNIT=VTS,VOL=(,,,255)
//SYSIN DD *
DUMP ODD(TAPE) ALLE -
DS(INC( -
G%%%.*.%%.MASK1(0) -
X%.*.*.MASK2(0) -
AN.OTHER.ONE*(0) -
))
Depending on your TAPE subsystem you may or may not want to code the COMPRESS parameter in the SYSIN or a DATACLAS in the JCL that provides ZEDC compression. Some TAPE subsystems such as DLM do their own compression so no point in coding COMPRESS. |
|
Back to top |
|
|
|