Page 1 of 1

How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 4:40 pm
by nikesh_rai
Hi,

I am trying to develop CLIST code from where i want to retirve the properties of TAPE dataset, I have alreday developed it for DASD dataset using LISTDSI command but unable to create for TAPE dataset.

Can anybody help me.

Thanks,
Nikesh

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 5:00 pm
by Robert Sample
Use the API of the tape management system installed at your site to query and retrieve the data you want.

Many sites will not allow a TSO user to allocate a tape; if this is true at your site and you want to directly access the tape (because for whatever reason the previous suggesion doesn't meet your goal), then you will need to accept that what you want to do will not be possible -- period. Contact your site support group to find out about allocation of tape to TSO users for your site.

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 5:13 pm
by nikesh_rai
Hi,

Thanks for quick reply but can we have something in CLIST commands for TAPE dataset like below (refer below e.g.) ???
or we need accept the fact that there is nothing in CLIST which can retrive the TAPE dataset properties (e.g. record length,format etc.)

e.g.

used below code to retrive the information for DASD dataset.

&DCB=&STR((LRECL=&STR(&SYSLRECL)+
&STR(,RECFM=)&STR(&SYSRECFM)+
&STR(,BLKSIZE=)&STR(&SYSBLKSIZE)+
&STR(,DSORG=)&STR(&SYSDSORG)))

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 5:22 pm
by BillyBoyo
Why are you doing anything new with CLIST? Why not use Rexx? Much more flexible, easier to read, available on multiple "platforms" - and something there is a benefit in putting on your CV!

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 5:25 pm
by Robert Sample
In order to retrieve information about a tape, there are two possible sources:
1) the tape management system in use at your site
2) the actual tape

If you are using the tape management system, the data is usually stored in some data base and there is an API to access that data; whether or not that API supports CLIST or REXX depends upon the vendor of the tape management product. You would need to read the documentation available at your site to find out.

If you want to access the actual tape, there is no way to get the data you want without mounting the tape on the drive. Sites generally forbid TSO users doing tape mounts. If this is what you are wanting to do, and it appears from your posts that it is, then you need to accept that what you want to do will not be possible at your site -- period.

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 5:52 pm
by nikesh_rai
Hi,

Looks like there is no way in CLIST to retrive the TAPE information easily like DASD.

As suggested gone through REXX manual but unable to find out something helpful for my query.

Can you please guide me for same.

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 6:14 pm
by enrico-sorichetti
Looks like there is no way in CLIST to retrive the TAPE information easily like DASD.


unfortunately REXX has the same issues for a vanilla environment.

check Your tape management product manuals to see if a REXX interface is provided

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 6:20 pm
by steve-myers
Apparently you did not bother to follow Mr. Sample's and Mr. Sorrichetti's excellent suggestions. RMM provides a wealth of information by using an API discussed in DFSMSrmm Application Programming Interface for your z/OS release. DFSMSrmm Application Programming Interface and DFSMSrmm Managing and Using Removable Media discuss line mode TSO commands that use the API. It would ceratainly be possible to use Rexx or CLIST and output trapping to retrieve this information, and scrape the information you need from this information.

Do some work!

Re: How to retrive the information of TAPE dataset via CLIST

PostPosted: Tue May 21, 2013 7:27 pm
by Robert Sample
Your last post indicates you do NOT understand the problem. The problem is NOT the use of CLIST versus REXX -- although there are certainly many good reasons to stop using CLIST and start using REXX.

The problem is that your TSO user id cannot access a tape volume in a TSO session. This will be true whether you use CLIST, REXX, COBOL, C, Assembler, PL/I, or any other language.

If your site uses CA-1, use the CA-1 API to get the data you want. If your site uses RMM, use the RMM API to get the data you want. If your site uses another tape management system, use that tape management system's API to get the data you want. However, if you cannot get what you want from the API of the tape management system, you cannot get what you want for tapes -- period.