View previous topic :: View next topic
|
Author |
Message |
bvanilkumar
New User
Joined: 23 Dec 2006 Posts: 10 Location: SYDNEY
|
|
|
|
Dear All,
I have a query related to VOLSER (Volume Serial) of a tape.
Situation : A dataset is archived to a tape where the VOLSER is dynamically generated. I need to retreive the VOLSER number and write into a VSAM file.
Questions:
1) How to define the 'VOLSER' parameter for dynamic allocation?
2) Is there any utility to get the VOLSER of a tape?
3) Can I pass the VOLSER to another step as PARM, so that a program can read the PARM and write into a VASM file.
Thank you
Regards
Anil |
|
Back to top |
|
|
itzphaniz
New User
Joined: 02 Sep 2005 Posts: 39
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is the archived file on a tape that is a collection of archives or is archived separately?
If it is archived separately, all you will need is to query the tape management system or do a LISTCAT to get the volser.
What will the entry in the vsam file be used for? Usually, volser info for an archive is not stored directly in an external file. What happens when the archive is rebuilt and the volser changes? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What do you mean that the VOLSER is dynamically generated ? All that happens is that the job selects a scratch tape from the pool and uses that tape.
Do you know the DSN being generated by your job, and is it catalogued ? If so, you can easily get the VOLSER by a utility such as IDCAMS. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi bvanilkumar !
Just one hint to your Top-3
You could add a step with a little programm that only opens and closes this tape, you created one step before. This programm must be a little assembler-pgm which is using the RDJFCB macro for reading the internal JobFileControlBlock of the JCL. Then you can extract the actual informations for that file. Like DatasetName, VolSer and so on. By looking at IOJFCB-DSECT, you could see all the internal FieldDefinitions where the Informations are stored in and where you could get them from.
Regards, UmeySan
Example for coding. The infile here is declared and named KTONDCB and the DD in the JCL for that file is HUGO.
*
USING IOJFCB,R5
RDJFCB KTONDCB ...macro-call rdjfcb
*
L R5,=A(KTONFCB) ...INIT SYSTEM-BLOCK FCB
MVC KTONNAM(44),JFCBDSNM ...MOVE DATASET-NAME
MVC KTONMEM(08),JFCBELNM ...MOVE MEMBER-NAME
.... move the desired informations to a list-output ore store them
anywhere you want
DROP R5
*
File-Definition
SPACE
KTONDCB DCB DDNAME=HUGO,
DSORG=PS,MACRF=GL,EXLST=KTONLST
SPACE
SPACE
DS 0F
KTONNAM DC CL44' ' ...Area DATASET-NAME
KTONMEM DC CL08' ' ...Area MEMBER-NAME
KTONVLS DC CL01' ' ...Area Count of VOLUMES
KTONVOL DC CL30' ' ...Area VOUME-NUMBERS
SPACE
DS 0F
KTONLST DC X'87' ...EXLST FUER RDJFCB
DC AL3(KTONFCB) ...ADRESS FUER RDJFCB
SPACE
DS 0F
KTONFCB DS 176C ...RETURN-Area FUER RDJFCB
SPACE
PRINT ON,NOGEN
Definition for the RDJFCB
PRINT ON,GEN
SPACE
IOJFCB DSECT
IEFJFCBN LIST=YES
SPACE
PRINT ON,NOGEN |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
UmeySan
Do you think it is a good idea for applications programmers to be chasing system control blocks, because I do not.
Don't forget that some applications programs need to be run from an APF authorised library. I shudder to think the damage a mis coded instruction may cause.
What is wrong with using the catalog structure to record the details of the tape and its use, from which the information can so easily be found and subsequently used. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi expat !
There's nothing wrong with your idea of using the catalog ore some other TapeManagementSystems.
But as a Systemprogrammer, i had been in some situations, where the using of a RDJCFB-call had been a suitable and neat solution for a problem. Also in former times, this was a standard practice for creating
legalized documents for the exchange of tapes beetween banks in europe.
But i agree with you, you have to be shure of what your'e doing.
Have a nice easter-weekend & regards,
UmeySan |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Have a nice easter-weekend & regards,
UmeySan |
Looks like you're having a nice lonnnnnnnnnnng weekend then. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Yes Sir, expat !
From today 15hundred zulu time till 12/04/07 08hundred.
And in fact of information, the wether will become fine.
So i hope most of the girls would only be lightly dressed !!!
Prettige paasdagen & regards,
UmeySan (Frankfurt am Main / Germany) |
|
Back to top |
|
|
mainframe_96
New User
Joined: 18 Dec 2006 Posts: 13 Location: usa
|
|
|
|
Hope this helps
Code: |
PYVSNO CSECT 00000010
PYVSNO AMODE ANY ADDRESSABILITY FOR CALLING MODULE 00000200
PYVSNO RMODE 24 RESIDENCY MODE FULL ADDRESSABILITY 00000301
ESTAB 12 00000020
B PASTSETU BRANCH PAST CONSTANTS 00000402
SETUP CONSTANTS FOR DATE TIME OF LAST ASSEMBLE 00000402
PASTSETU EQU * 00000402
LR 3,1 00000030
L 4,0(3) ADDRESS OF DCB 00000040
MVC DCBADDR,0(4) 00000050
LA 4,DCBADDR 00000060
USING IHADCB,4 00000070
LA 5,JFCB 00000080
MVC DCBEXLST+1(3),=AL3(PARMLST) 00000090
ST 4,JFCB 00000100
MVC LABEL(3),JFCB+1 00000110
RDJFCB (4) 00000120
LABEL EQU *-5 00000130
L 6,4(3) 00000140
XR 7,7 00000150
IC 7,JFCB+117 LOAD NO OF VOL SERS 00000160
STH 7,0(6) STORE IN FIRST 2 CHARS OF PARM 00000170
MVC 2(30,6),JFCB+118 MOVE FIRST FIVE VOL SERS 00000180
MVC 38(44,6),JFCB MOVE DSN TO PARM AREA 00000190
MVC DCBEXLST+1(3),=AL3(0) 00000200
UNESTAB 00000210
DS 0D 00000220
PRINT GEN 00000230
PARMLST DC A(*+4) 00000240
DC X'07' 00000250
DC AL3(JFCB) 00000260
DC X'80' 00000270
DC AL3(0) 00000280
JFCB DS CL176 00000320
DCBADDR DS CL200 00000330
LTORG 00000340
PRINT NOGEN 00000350
DCBD DSORG=PS 00000360
END 00000370[code][/code] |
|
|
Back to top |
|
|
|