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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
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    Post subject: To pass a string from a REXX routine to the ISPF 3.4 option
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    Post subject: Reply to: To pass a string from a REXX routine to the ISPF 3
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Mar 27, 2008 7:08 pm    Post subject: Reply to: To pass a string from a REXX routine to the ISPF 3
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    Post subject: To pass a string from a REXX routine to the ISPF 3.4 option.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Mar 27, 2008 7:51 pm    Post subject: Reply to: To pass a string from a REXX routine to the ISPF 3
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    Post subject: To pass a string from a REXX routine to the ISPF 3.4 option.
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Mar 27, 2008 8:15 pm    Post subject: Reply to: To pass a string from a REXX routine to the ISPF 3
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    Post subject: Re: To pass a string from a REXX routine to the ISPF 3.4 opt
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Mar 27, 2008 9:42 pm    Post subject: Reply to: To pass a string from a REXX routine to the ISPF 3
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    Post subject: To pass a string from a REXX routine to the ISPF 3.4
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Mar 28, 2008 3:27 pm    Post subject: Reply to: To pass a string from a REXX routine to the ISPF 3
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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