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

Find out DCB information of existing TAPE dataset


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anishdosslin

New User


Joined: 29 Dec 2005
Posts: 1

PostPosted: Thu Dec 29, 2005 1:50 am
Reply with quote

Hi,

I am developing a REXX tool that has to find out information like LRECL, BLKSIZE et al of a set of tape datasets and write them into a file.

Please let me know how to go about this.

Regards
Anish
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 29, 2005 12:09 pm
Reply with quote

anishdosslin -

REXX is a programming language. It does not have access to datasets directly, but only through "others", like TSO commands or ISPF services.
Even the famous LISTDSI function is actually a TSO function.

Ask your system guys what kind of TMS (tape management system) you have. Then, read the manual and find the best way to interface it from within REXX.

O.
Back to top
View user's profile Send private message
mak_tcs

New User


Joined: 23 Nov 2005
Posts: 69
Location: Minneapolis, MN USA

PostPosted: Thu Dec 29, 2005 12:32 pm
Reply with quote

Dear Anish,

I dont think you can get Tape Parameters through REXX. U need to refer Tape Management System to do the same!

But I can give you the code which helps you to find parameters of a sequential file;

Code:
/***rexx***/           
dsn='HLQ.DATA.SET'       
x=listdsi(''''dsn'''') 
if x=0 THEN             
do                     
  vol=SYSVOLUME         
  len=SYSLRECL         
  BLK=SYSBLKSIZE       
  say 'vol' vol         
  say 'LEN' len         
  say 'BLK' BLK         
end                     
exit     


Thanks,
Mani
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 29, 2005 12:41 pm
Reply with quote

IBM's REXX reference states that you can't use LISTDSI to retrieve tape information.

O.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Fri Dec 30, 2005 1:44 am
Reply with quote

I'm in accord with ofer71 but if you want to use rexx anyway I suggest you to run IEBANTP to retrieve every kind of information about your tape.


P.S. = I never tested it with virtual tape only with 3480/3490
Back to top
View user's profile Send private message
punitsurana

New User


Joined: 17 Jan 2006
Posts: 6

PostPosted: Wed Feb 15, 2006 10:36 am
Reply with quote

Hi MGIndaco,

Could you please provide a sample REXX using the IEBANTP Command?

Thanks and Regards,
Punit Surana
Back to top
View user's profile Send private message
sureshrathnam

New User


Joined: 25 Mar 2005
Posts: 1
Location: Jacksonville

PostPosted: Mon Jan 12, 2009 11:20 pm
Reply with quote

DSLIST can list the volume and storage device type. You may call DSLIST from either Clist or REXX.

Below is the example in REXX

X = Outtrap("OUT.",20)
LISTDS DSN DSN === Your tape or DASD dataset name
X = Outtrap("OFF")


Below is the trapped output of DSLIST

VOLSER-DEV---TYPE-----------DSN----
U84388 3490 NON-VSAM ------DSN name CATALOG: SYS1.ICFUCAT.TSTWT040

where U84388 is the volume (ignore)

3490 is storage device for tape. (3390 is for DASD datasets.)
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 Jan 13, 2009 1:19 am
Reply with quote

Hello and welcome to the forum,

First - please be aware that you have replied to a topic that has been inactive for 2 years. It is best to reply to current, active topics.

Second - when providing info, please provide what was requested rather than something else. The request was for "dcb" type info and what the posted code provides is catalog info.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top