View previous topic :: View next topic
|
Author |
Message |
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Display the panel within a loop. Check the return code from the DISPLAY service. If 8 or higher, exit the loop. |
|
Back to top |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Have you tried the panel trace facility ISPDPTRC - documented in the fine manuals |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
Hello All,
Thanks for all your help.Your 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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Rexx will not substitute anything within quotes. You probably want something like this:
Code: |
"VIEW DATASET("MEMBER")" |
|
|
Back to top |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What was changed between the last time this worked and now that it does not? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Should use Address ISPEXEC rather that Address ISREDIT. |
|
Back to top |
|
|
|