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

How to process the input given from the ISPFpanel


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Sat Jan 17, 2009 9:33 am
Reply with quote

Hello All,

I have created a ISPF panel
Code:


'ISREDIT MACRO'                                                 
                     
TRACE ?R                                                       
ADDRESS ISPEXEC "LIBDEF ISPPLIB DATASET ID(SYED.TOOL.PANEL')"
ADDRESS ISPEXEC "DISPLAY PANEL(ABC)"   

                         
                         
                                           


This is the code for the ISPF panel

Code:

)ATTR                                                                     
  + TYPE(TEXT)   INTENS(LOW)         SKIP(ON)                             
  % TYPE(TEXT)   INTENS(HIGH) SKIP(ON)                                     
  _ TYPE(INPUT)  INTENS(HIGH) CAPS(ON) HILITE(USCORE) COLOR(WHITE)         
  \ TYPE(OUTPUT) INTENS(HIGH)                                             
  # TYPE(OUTPUT) INTENS(HIGH) JUST(RIGHT)                                 
        TYPE(TEXT)   INTENS(LOW)  SKIP(ON)                                 
  $ TYPE(TEXT)   INTENS(HIGH) SKIP(ON)                                     
  ~ TYPE(INPUT)  INTENS(HIGH) CAPS(ON)                                     
)BODY EXPAND(::)                                                           
%COMMAND ===>_ZCMD                                                         
+                   === REXX ABEND UTILITY SYSTEM  ===                     
+      ==== VIEW OR BROWSE A DATASET OR FILE OR MEMBER     ====           
+                                                                         
    ENTER THE NODE NAME ==>_INF                                           
+
+       1.ABC    2.XYZ+                                                                         

+   ENTER THE MEMBER TYPE==>_INMEM   

+                                                                       
+           1.CPY      2.SRC     3.CTL   4.PRC    5.EXC                 
+                                                                       
+           6.EXP      7.JCL     8.INC   9.RD                           
+                                                                       
    INPUT MEMBER NAME   ==>_INSTR                                       
                                                                         
+                                                                       


                                     
)MODEL                                                                 
+                                                                     
)INIT                                                                 
  &INF      = ''                                                       
  &OUTF     = ''                                                       
  &INSTR    = ''                                                       
  &INMEM    = ''                                                       
  &OUTSTR   = ''                                                       
  &KEYNUM   = .PFKEY                                                   
  &ZTDMARK  = '---------------------------------------------+         
               ----------------------------------'                     
)PROC                                                                 
VER (&INF, NB)                                                       
VER (&OUTF, NB)                                                       
VER (&INSTR, NB)                                                     
VER (&INMEM, NB)                                                     
IF (&OUTF = &INF)                                                     
   &OUTF  = '***ERROR: INPUT NAME = OUTPUT NAME ***'                 
IF (&KEYNUM = 'PF03')                                                 
   &NOMORE  = 'Y'                                                     
    &NOMORE  = 'Y'
 )END           

 


My query is on prcessing the input from the panel.

if I enter 1 at _INF it should select ABC PDS and similarly if INMEM =1 it select copy books.

I wanted to know like when I enter this data,how to open the dataset in different or same panel.

1)Do I need to define a variable?
2)How is the variable defined and how do I refer it in the Rexx program?
3)Are INF,INSTR and INMEM are defined by me as I do not if some Inbuilt variable or names exists ?

Sample code is Appreciated.Just for understanding as I am a beginner.

Thanks

Syed Sameer Ahmed
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat Jan 17, 2009 12:49 pm
Reply with quote

If you use the same name for the variables in the panel and REXX there is no problem.

The variable is created in either the panel or the REXX and can be passed between the two once it has been created.
Back to top
View user's profile Send private message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Sat Jan 17, 2009 12:57 pm
Reply with quote

Thanks Expat,but does that mean If I am using ==>_INF in panel.The same can be used in a Rexx progrm for comparisons and conditional execution.

ex: if INF=1 then
View dataset "ABC.CPY"

Will similar stuff like this work..

and I also want to view the PDS and once PF3 is pressed the Panel should be displayed again similar to file-aid and I am not able to get a sample code or example on how to use,nor any material related to PANEL and REXX integration.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat Jan 17, 2009 1:02 pm
Reply with quote

Quote:
Thanks Expat,but does that mean If I am using ==>_INF in panel.The same can be used in a Rexx progrm for comparisons and conditional execution.
ex: if INF=1 then
View dataset "ABC.CPY"

Correct

Use the manuals button at the top of the page to get to the REXX and ISPF manuals.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Sun Jan 18, 2009 10:12 pm
Reply with quote

Display the panel within a loop. Check the return code from the DISPLAY service. If 8 or higher, exit the loop.
Back to top
View user's profile Send private message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Tue Jan 27, 2009 1:07 pm
Reply with quote

I am able to process numerics from Panel but not any alpha data like ABC.
It also diplay "Missing field definition " in the panel..

Please help how to remove this bugs.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Jan 27, 2009 1:26 pm
Reply with quote

Have you tried the panel trace facility ISPDPTRC - documented in the fine manuals
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Tue Jan 27, 2009 9:53 pm
Reply with quote

Quote:
I am able to process numerics from Panel but not any alpha data like ABC.
It also diplay "Missing field definition " in the panel..


More details please:
1. which field are you talking about?
2. What do you mean by 'process'?
3. What is the message id of the 'missing field definition' message?
Back to top
View user's profile Send private message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Thu Jan 29, 2009 7:36 pm
Reply with quote

Hello All,

Thanks for all your help.Your icon_biggrin.gif helping nature made me learn many things.
I was able to resolve many things by your suggestions and help.

I have few things to understand as
1) where and how is the Message Id displayed
2) I have concatenated the dataset in the RExx as
Code:

NODE=ABC.CPY.||INF||P.XYZ
MEMBER=NODE||'('||INSTR||')'   
     

where INF = PQR and INSTR= HIJ
I get the Member as ABC.CPY.PQRP.XYZ(HIJ)

but I am not able to browse the concatenated dataset using
Code:

       
IF SYSDSN(MEMBER) = 'OK' THEN   
      DO                         
       "VIEW DATASET(MEMBER)"   
      END


Could any body help me with as what is wrong in referencing the member in SYSDSN.
Why is the Concatenation is not substituted in place of Member?

Kindly let me know if it perplexing.

Thanks
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Thu Jan 29, 2009 9:51 pm
Reply with quote

Rexx will not substitute anything within quotes. You probably want something like this:
Code:
"VIEW DATASET("MEMBER")"
Back to top
View user's profile Send private message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Tue Feb 03, 2009 2:39 pm
Reply with quote

Hello Good People,

Thanks for all your answers and help.

How can I leave a field as optional.I have three fields in panel.
1) INSTR
2) INMEM
3) INF

I want all fields to be optional.

Code:


 ENTER THE NODE NAME ==> _INSTR                               
         1.ABC      2.DEF     3.GHI     4.JKL     5.MNP
                                                       
                                                                 
 ENTER THE MEMBER TYPE==> _ INMEM                             
                                                       
         1.CPY      2.SRC     3.CTL   4.PRC    5.EXC   
                                                       
         6.EXP      7.JCL     8.INC   9.RD             
                                                       
 INPUT MEMBER NAME   ==> _ INF



How should a variable be defined for these.

I have defined the variable as

Code:
)
MODEL                                                                   
+                                                                         
)INIT                                                                     
  &INF      = ''                                                         
  &INSTR    = ''                                                         
  &INMEM    = ''                                                         
  &KEYNUM   = .PFKEY                                                     
  &ZTDMARK  = '---------------------------------------------+             
               ----------------------------------'                       
)PROC                                                                     
VER (&INF,NB)                                                             
VER (&INSTR,NB)                                                           
VER (&INMEM,NB)                                                           
IF (&KEYNUM = 'PF03')                                                     
   &NOMORE  = 'Y'                                                         
)END                                                                     
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Tue Feb 03, 2009 10:06 pm
Reply with quote

If I recall correctly, these statements:
Code:

VER (&INF,NB)   
VER (&INSTR,NB)
VER (&INMEM,NB) 

Require that the values be non-blank. If you want to allow blanks, then remove these statements.
Back to top
View user's profile Send private message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Thu Feb 05, 2009 8:12 am
Reply with quote

Hello ,

I have debugged and my tool was working fine but now I am getting a error message as

" IKJ56500I COMMAND VIEW NOT FOUND
"VIEW DATASET('ABCD.XYZ.CPY("INSTR")')"

Please help me out as why "VIEW" command is not working now.

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Feb 05, 2009 8:19 am
Reply with quote

Hello,

What was changed between the last time this worked and now that it does not?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2593
Location: Silicon Valley

PostPosted: Fri Feb 06, 2009 5:15 am
Reply with quote

Should use Address ISPEXEC rather that Address ISREDIT.
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 COBOL sorting, with input GDG base COBOL Programming 7
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top