MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

To Get VTS TAPE LABEL using COBOL Program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
raj2512
Beginner


Joined: 16 Mar 2005
Posts: 5
Topics: 2

PostPosted: Tue Dec 11, 2007 3:27 pm    Post subject: To Get VTS TAPE LABEL using COBOL Program Reply with quote

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
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue Dec 11, 2007 5:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
raj2512
Beginner


Joined: 16 Mar 2005
Posts: 5
Topics: 2

PostPosted: Tue Dec 11, 2007 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Dec 12, 2007 9:10 am    Post subject: Reply with quote

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
View user's profile Send private message
raj2512
Beginner


Joined: 16 Mar 2005
Posts: 5
Topics: 2

PostPosted: Wed Dec 12, 2007 10:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Dec 12, 2007 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group