Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rexx exec for 3.4 Vtoc function in batch

Status
Not open for further replies.

michaelhall

Programmer
Jul 7, 2003
1
CN
I have seen some doc which says I can use LMD services to produce a VTOC listing from a rexx exec. I have looked at the ISPF manuals and the process is not clear. I want to Pull a volume from batch JCL job and enter into LMDINIT and LMDLIST services to print out the vtoc information. But how to do?? I would appreciate any help. Thanks.
 
Here's some code that I have written to do what you are talking about.

Where DPATTERN is a variable passed in from a panel I display before this processing. This will load the dataset names into a table (that you can then use). It skips over GDG bases and Alaises (but you can change that if you want).


"LMDINIT LISTID(LISTID) LEVEL("DPATTERN")"
L_RC = RC
IF L_RC > 0 THEN DO
ZEDSMSG = ""
SELECT
WHEN L_RC = 8 THEN
ZEDLMSG = "LISTID NOT CREATED FOR" DPATTERN
WHEN L_RC = 12 THEN
ZEDLMSG = "INVALID HIGH LEVEL QUALIFIER:" DPATTERN
WHEN L_RC = 16 THEN
ZEDLMSG = "TRUNCATION OR TRANSLATION ERROR IN DIALOG VARIABLES."
WHEN L_RC = 20 THEN
ZEDLMSG = "SEVERE ERROR IN ISPF PROCESSING"
OTHERWISE
ZEDLMSG = "UNKNOWN ERROR IN LMDINIT"
END
ZEDSMSG = ""
"SETMSG MSG(ISRZ000)"
END

ADDRESS ISPEXEC
"TBCREATE " T_NAM " NAMES(DSNAME) NOWRITE"

DSNAME = " "
DO UNTIL RC > 0
"LMDLIST LISTID("LISTID") DATASET(DSNAME) OPTION(LIST) STATS(YES)"
IF RC = 0 THEN DO
IF (ZDLVOL = "*ALIAS") | (ZDLVOL = "??????") THEN
ITERATE
"TBADD" T_NAM /* ADD TO TABLE */
GOT_ONE = 1
END
END


Hope this helps!

-J.D. Hill
TARPA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top