View previous topic :: View next topic |
Author |
Message |
raj2512 Beginner
Joined: 16 Mar 2005 Posts: 5 Topics: 2
|
Posted: Tue Dec 11, 2007 3:27 pm Post subject: To Get VTS TAPE LABEL using COBOL Program |
|
|
Hi,
Our Shop have moved to VTS from Traditonal 3840 tapes couple of years back. But a set of Batch COBOL programs were never run in tha last couple of years and we need to run them now.
These programs need to get the Label of the tape on which the input file resides and we store this Label number on the database along with other data.(Basically archiving data)
This is the current code related to getting the Label Num :
Code: |
01 WS-LABEL-REC.
05 WS-LABEL-IDENTIFIER PIC X(04).
05 WS-LABEL-FIL01 PIC X(31).
05 WS-LABEL-GEN-NUM PIC 9(04).
05 WS-LABEL-FIL02 PIC X(41).
READ TAPEIN-FILE INTO WS-LABEL-REC
AT END
DISPLAY 'GENERATION NOT FOUND'
IF WS-LABEL-IDENTIFIER = 'HDR1'
DISPLAY 'TAPE GENERATION: ' WS-LABEL-GEN-NUM
GO TO 0025-EXIT
|
This does not work with VTS files
Can you please help me how get the Label Number for VTS files using COBOL.
Thanks |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Tue Dec 11, 2007 5:24 pm Post subject: |
|
|
The tape HDR1 label formats have not changed.
Is the tape still created as LABEL=SL?
What does the JCL look like for your COBOL pgm?
Do you specify LABEL=(,BLP) with the real VOLSER on input? _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
raj2512 Beginner
Joined: 16 Mar 2005 Posts: 5 Topics: 2
|
Posted: Tue Dec 11, 2007 5:46 pm Post subject: |
|
|
Thanks for the reply...
The DD card for the input file is
//TAPEFILE DD DSN=XX.XXX.XXXX,DISP=OLD,LABEL=(,BLP)
The volser number is not mentioned. It prompts the operator to enter the VOLSER.
Can we access the HDR1 label formats with the same code. |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Dec 12, 2007 9:10 am Post subject: |
|
|
The same code will work but you must ensure that you allocate a tape unit in the VTS when the job starts.
What I do is code a volser of a known VTS tape and add UNIT=(,,DEFER) so the mount doesn't really happen yet. When the actual volser is entered via the reply and the FILE is OPENED in the program then the correct tape should be mounted. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
raj2512 Beginner
Joined: 16 Mar 2005 Posts: 5 Topics: 2
|
Posted: Wed Dec 12, 2007 10:07 am Post subject: |
|
|
Hi Dennis,
Is there a way to tell if it is a VTS tape when we do TMS inquiry.
Another question when we create the VTS tape file do we need to change
the old JCl cards. This my OLD JCL card
Code: |
//SYSUT2 DD DSN=PR.T1.ARCHIVE.TAPE.A031998.T1.BKUP,
// DISP=(NEW,CATLG,DELETE),
// DCB=(SYS1.MODDSCB,LRECL=782,BLKSIZE=0,RECFM=FB),
// UNIT=CTAPE,
// VOL=(,,,30),
// LABEL=EXPDT=99365
|
|
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Dec 12, 2007 12:29 pm Post subject: |
|
|
An TMS inquiry may show non=zero values for Robot type (ROBTY) or Robot ID (ROBID) if your OAM exits are supplying a value for VTS tapes. Otherwise, there is usually a separate VOLSER range you can test for.
Any JCL changes will be determined by your site policies. Something (DSN, UNIT, etc) will be used by the DFSMS routines to direct unit allocation to the VTS. Only someone at your site can tell you what is required. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
|
|