IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SAS: TAPELABEL Procedure


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 06, 2010 3:27 am
Reply with quote

The subject SAS procedure returns information about files on a tape volume.

Does anyone know of way to get the tape drive "model" via SAS (using TAPELABEL or something else)?

I wasn't able to find anything looking at the SAS site, but then, i don't really "speak" SAS.

Thanks,

d
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Mar 06, 2010 6:22 am
Reply with quote

Dick, I'll be traveling tomorrow but when I get a chance I'll look at what I've got -- I vaguely recall something is possible but don't remember what (it's been a long day -- moved my son into his house, returned the truck to the rental place, and so forth).
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 06, 2010 10:02 am
Reply with quote

Hi Robert,

Quote:
moved my son into his house, returned the truck to the rental place, and so forth
Ain't movin' just so much fun. . . icon_cool.gif

Don't know if they still have the same "slogan" on the front/side of some of the trucks, but U-Haul used to have "Adventure in Moving" prominently displayed. . . Last thing i wanted was an adventure. . .

Thanks for looking into this - 'preciate it icon_smile.gif

d
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Mar 06, 2010 10:30 am
Reply with quote

They still have Adventure in Moving on the side of U-Haul trucks; he used Budget this time.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Sat Mar 06, 2010 1:18 pm
Reply with quote

Use the DEVTYPE parameter on the FILE, INFILE or FILENAME statement.

see :

SAS® 9.2 Companion for z/OS®
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Mar 08, 2010 11:05 pm
Reply with quote

Thanks icon_smile.gif

From the Companion (bolding is mine):
Quote:
Host Options for Retrieving Information about Data Sets

The following options are used in the FILE, FILENAME, and INFILE statements to retrieve information about a data set from the operating environment control blocks. SAS assigns values to the variables that are defined by these options when it opens the data set. It updates the values every time it opens a new data set in a concatenation. You can use these options with all standard external files under z/OS.
DEVTYPE=variable
defines a character variable (minimum length 24) that SAS sets to the device type.

In this process, there is no file declared/used by the SAS process - the entire SAS SYSIN is:
Code:
//SAS.SYSIN DD *               
PROC TAPELABEL DDNAME=TAPE;   
TITLE1 'SOME TITLE STUFF';     
TITLE2 'ADDITIONAL TITLE STUFF ';     
TITLE3 '----------------';     

Unfortunately, there is nowhere that i can find to tell the TAPELABEL process to show the DEVTYPE. Suggestions?

One would usually look for this in the Tape Management system, but that (yup, believe it or not) cannot be done as there is no automated tape management system. . .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Mar 08, 2010 11:54 pm
Reply with quote

If the tape contains a SAS data base, using PROC CONTENTS will provide information such as
Code:

                               THE CONTENTS PROCEDURE

                                     DIRECTORY

                   LIBREF         HISTWEK
                   ENGINE         V9TAPE
                   ACCESS         READONLY
                   PHYSICAL NAME  MXG.WEEKLY.HISTORY.WKOF.D111509
                   UNIT           TAPE
                   VOLUME         73959
                   DISPOSITION    SHR
                   DEVICE         3480
                   BLOCKSIZE      32760
but I think the device here may just be the symbolic for the tape drive, not the actual device type.

Sorry it took so long to get back to you, but I spent most of yesterday trying to get over the trip, soothing sore muscles, and so forth.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 09, 2010 1:20 am
Reply with quote

Hi Robert,

Quote:
Sorry it took so long to get back to you
Not to worry icon_smile.gif

Quote:
but I spent most of yesterday trying to get over the trip, soothing sore muscles, and so forth.
My days of actually being the "mover" are behind me. I'll still drive the truck cross-country and even make suggestions on the load/unload, but the younger folks can do the lift/carry. . .

Quote:
If the tape contains a SAS data base
The "tape" can be pretty much anything. . . Due to having no real tape management, there is a fairly regular need to print the label info to resolve problems. . . This client does not own the mainframe, but rents time from a service center. Recently, someone wrote an ugly review and the "brains" decided that the use of blp be "secured". Of course, TAPELABEL bypasses the label "under the covers". . .

Other thoughts of how to exploit SAS features to get at the labels for the volume and first headers?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Mar 09, 2010 1:28 pm
Reply with quote

TAPELABEL will NOT give any devicetype info.

For each file on a tape volume, TAPELABEL generates the following information:
FILE NUMBER, the file sequence number
DSNAME, the data set name
RECFM, the record format
LRECL, the logical record length
BLKSIZE, the block size
BLOCK COUNT, the number of blocks in the file (from the trailer label)
EST FEET, the estimated length of the file in feet (assumes all blocks=BLKSIZE)
CREATED, the file creation date
EXPIRES, the file expiration date
CREATED BY JOB NAME STEPNAME, the job and step names of the job that
created the file
TRTCH, the track recording technique
DEN, the file recording density code
PSWD, the file protection indicator
UHL, the number of user header labels
UTL, the number of user trailer labels.
TAPELABEL also lists the sum of the estimated file lengths.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Mar 09, 2010 1:57 pm
Reply with quote

Hi,

Could u pls say, is the tape drive "model" same as the unit parameter?
If yes then we can get the unit parameter value from SAS LOG by executing a INFILE statement,


The SAS LOG output is shown below:

Code:
NOTE: The infile FILE1 is:                     
      Dsname=*.TAPE.DATASET,
      Unit=3490E,Volume=M12345,Disp=OLD,     
      Blksize=27998,Lrecl=32756,Recfm=VBS
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Mar 09, 2010 2:45 pm
Reply with quote

Nice one Vasanth.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
No new posts Stored procedure cpu utilization DB2 1
Search our Forums:

Back to Top