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

To pass a string from a REXX routine to the ISPF 3.4 option


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jenson Luke

New User


Joined: 11 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Wed Mar 26, 2008 6:10 pm
Reply with quote

How to pass a file name or a string from the rexx routine to the ISPF 3.4 option.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Mar 26, 2008 8:00 pm
Reply with quote

This is some code I use to access option 3.4 from REXX. I'm not sure if it will work at all mainframe centers. The REXX program should be stored in a REXX library under OPT34 (or any REXX name you select).

You should then be able to enter TSO OPT34 HLQ.2NDQUAL on the command line and a 3.4 display should appear. Sorry if it doesn't work in your location.

Code:

/* REXX */                                               
PARSE UPPER ARG DSN                                     
"ISPEXEC LMDINIT LISTID(XQDSLST) LEVEL("DSN")"           
"ISPEXEC LMDDISP LISTID("XQDSLST")"                     
IF RC > 0                                               
  THEN DO                                               
    "SETMSG MSG("ZERRMSG")"                             
  END                                                   
"ISPEXEC LMDFREE LISTID("XQDSLST")"                     
EXIT                                                     
Back to top
View user's profile Send private message
Jenson Luke

New User


Joined: 11 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Thu Mar 27, 2008 6:43 pm
Reply with quote

I have tried your code but it is not working.

below is my code.

ADDRESS ISPEXEC "LMDINIT LISTID(DSNM) LEVEL("DSN")"
ADDRESS ISPEXEC "LMDDISP LISTID("DSNM")"

Here DSNM is the variable that contains the dataset name. so here I want to pass the value of the DSNM to the 3.4 option.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 27, 2008 7:08 pm
Reply with quote

DSNM is the variable that contains the list identifier assigned by ISPF at LMDINIT time

Code:
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /*                                                                   */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "R"
000005 Parse upper arg hlq
000006 Address ISPEXEC "LMDINIT LISTID(LIST) LEVEL("hlq")"
000007 Address ISPEXEC "LMDDISP LISTID("LIST")"
000008 Address ISPEXEC "LMDFREE LISTID("LIST")"
000009 Exit
000010
****** **************************** Bottom of Data ****************************


it will invoke the equivalent of 3.4 for the hlq passed as a parameter

save the script in a library in your sysproc/sysexec concatenation
and invoke it as "TSO ...yourchosenname... sys1"
no reason for it not to work it was tested
Back to top
View user's profile Send private message
Jenson Luke

New User


Joined: 11 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Thu Mar 27, 2008 7:44 pm
Reply with quote

The above given code performs two function.
1) First it will paste the given dataset in the 3.4 option.
2) Then it performs the enter function to list all the datasets.

But my requirement is only to perform the 1st point alone.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 27, 2008 7:51 pm
Reply with quote

Quote:
The above given code performs two function.
1) First it will paste the given dataset in the 3.4 option.


You got it wrong

LM services are user interfaces to the same services which are being used by the PDF dialogs

the screen layouts used as defaults are just a usability kindness
... any user written panel could be used

so please clarify a bit more Your requirements
Back to top
View user's profile Send private message
Jenson Luke

New User


Joined: 11 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Thu Mar 27, 2008 8:09 pm
Reply with quote

I want only the string to be displayed in the 3.4 option.
In the below given example the string is
XAMCV.TEST.MASTER.AMCK001. From the Rexx code I just want to pass the string to the 3.4 option as it is shown below.



eg:-

Option ===>

blank Display data set list P Print data set list
V Display VTOC information PV Print VTOC information

Enter one or both of the parameters below:
Dsname Level . . . XAMCV.TEST.MASTER.AMCK001
Volume serial . .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 27, 2008 8:15 pm
Reply with quote

No it cannot be done !
it would be simpler to write Your own dialog
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Mar 27, 2008 9:12 pm
Reply with quote

Jenson Luke wrote:
I want only the string to be displayed in the 3.4 option.
. .
What will you do with it once you get to the 3.4 panel? Is it something that can be done within the REXX itself? Please describe your intent.
Perhaps you could update the value in variable ZDLDSNLV within the REXX and then go to the panel?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 27, 2008 9:42 pm
Reply with quote

Correction to my previous post

it can be done thru an undocumented interface
might work for strict personal use, not recommended for general use

if You are curious just look at the way ispf does it
Back to top
View user's profile Send private message
Jenson Luke

New User


Joined: 11 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Fri Mar 28, 2008 10:53 am
Reply with quote

Requirement is to browse a Vsam file using start tool.
So I just want to know is there is any line command to invoke a startool.
I want to pass a string from the rexx routine to open the VSAM dataset in a browse or a edit mode using startool.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 28, 2008 3:27 pm
Reply with quote

check Your star tool customization

in an IBM add on products environment if You have ditto installed

from a 3.4 dataset list typing B in the dataset command filed the vsam browse function of ditto will be invoked

I guess that there should be something similar for serena startools
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Fri Mar 28, 2008 3:43 pm
Reply with quote

Code:

/*>Rexx --------------------------------------------------------------*/
/* Parms: dsn     DSNAME                                              */
/*        bdsn    COPYBOOK LIBRARY                                    */
/*        snmb    COPYBOOK                                            */
/*--------------------------------------------------------------------*/
arg dsn bdsn snmb                                                       
                                                                       
bdsn="'"bdsn"'"                                                         
pdscbdsn=bdsn  ;"vput (pdscbdsn) profile"                               
pdsdsnmb=snmb  ;"vput (pdsdsnmb) profile"                               
pdsdsn  =dsn   ;"vput (pdsdsn)   profile"                               
pds2dsn =pdsdsn;"vput (pds2dsn)  profile"                               
                                                                       
pdsdsntp='MVS' ;"vput (pdsdsntp) profile"                               
pdsaldsp='SHR' ;"vput (pdsaldsp) profile"                               
pdspedcb='YES' ;"vput (pdspedcb) profile"                               
pdspedsl='YES' ;"vput (pdspedsl) profile"                               
                                                                       
address tso "YOURCOMMANDTOSTARTSTARTOOLHERE"                           
exit                                                                   
Back to top
View user's profile Send private message
Jenson Luke

New User


Joined: 11 Jan 2008
Posts: 14
Location: Chennai

PostPosted: Mon Apr 07, 2008 6:22 pm
Reply with quote

I have added the following code in my program, now it is working fine.

ADDRESS ISPEXEC "LIBDEF ISPPLIB DATASET ID('SYS1.STARTOOL.PANELS',
'SYS2.WORKBNCH.ISPPLIB')"
ADDRESS ISPEXEC "LIBDEF ISPSLIB DATASET ID('SYS1.STARTOOL.SKELS')"
ADDRESS ISPEXEC "LIBDEF ISPMLIB DATASET ID('SYS1.STARTOOL.MSGS')"
ADDRESS ISPEXEC "LIBDEF ISPLLIB DATASET ID('SYS1.STARTOOL.LOADLIB',
'SYS2.WORKBNCH.LINKLIB')"
ADDRESS TSO STARTOOL "'"dsn"'"



Where dsn is the variable which contains the name of the dataset.
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top