Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SAS: TAPELABEL Procedure

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

Site Director


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

PostPosted: Sat Mar 06, 2010 3:27 am    Post subject: SAS: TAPELABEL Procedure
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Sat Mar 06, 2010 6:22 am    Post subject:
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

Site Director


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

PostPosted: Sat Mar 06, 2010 10:02 am    Post subject: Reply to: SAS: TAPELABEL Procedure
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Sat Mar 06, 2010 10:30 am    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Sat Mar 06, 2010 1:18 pm    Post subject:
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

Site Director


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

PostPosted: Mon Mar 08, 2010 11:05 pm    Post subject:
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 08, 2010 11:54 pm    Post subject:
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

Site Director


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

PostPosted: Tue Mar 09, 2010 1:20 am    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Tue Mar 09, 2010 1:28 pm    Post subject:
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: 1504
Location: Chennai

PostPosted: Tue Mar 09, 2010 1:57 pm    Post subject:
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: 2435
Location: Netherlands, Amstelveen

PostPosted: Tue Mar 09, 2010 2:45 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
This topic is locked: you cannot edit posts or make replies. Stored procedure on Federated thru DB2 arif677 DB2 6 Tue May 31, 2016 11:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us