View previous topic :: View next topic
|
Author |
Message |
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
I'm trying to design a ISPF panel and trying to pass values from the panel to rexx code. My rexx code is submitting one JCL for execution and separately is working fine. However I'm trying to pass the values from the panel and submit the same code. Its giving the error
"'SUBMIT' is not a recognized dialog service name."
For example I'm accepting DATE1 from the ISPF panel.
(Being very new to rexx,your valuable suggestions and input are most welcome!)
Panel code:
Code: |
)ATTR
# TYPE(TEXT) INTENS(LOW) SKIP(ON)
! TYPE(TEXT) INTENS(HIGH) SKIP(ON) COLOR(YELLOW)
)BODY
%************************************************
% +ENTER SYSTEM NAME ===>_SYSTEM #
% +ENTER DATEEM NAME ===>_DAT1 #
% +ENTER POLICY NUMB ===>_POL1 #
%
%_MSG1
%
%
%
%************************************************
PF3=EXIT
)INIT
.CURSOR=SYSTEM
)PROC
&PFPRSD = .PFKEY
)END |
Rexx code i am trying with
Code: |
/* REXX TESTREXX */
ADDRESS TSO;
ADDRESS "ISPEXEC"
"LIBDEF ISPPLIB DATASET ID('userid.REXX.PANEL')"
START:
"DISPLAY PANEL(PANL1)"
IF PFPRSD = 'PF03' THEN
EXIT
USER =USERID()
SELECT
WHEN SYSTEM = 'CASE1' THEN
DO
QUEUE "//"USER"A JOB (10,J15122),'UPDAT-',CLASS=T,"
QUEUE "// MSGCLASS=V,NOTIFY=&SYSUID"
QUEUE "/*JOBPARM L=0,T=0 "
QUEUE "// SET DATE="DAT1" "
QUEUE "//....."
QUEUE "//SYSLIST DD SYSOUT=* "
QUEUE "$$"
O = OUTTRAP("OUTPUT.",,"CONCAT")
"SUBMIT * END($$)" /*SUBMIT JCL */
O = OUTTRAP(OFF)
/* OUTPUT LINE SAYING SUBMIITED AND JOB ### */
SAY OUTPUT.2
SAY "YOUR OUTPUT DATASET WILL BE '"USER".BA."DAT1".DATASET2' "
.........
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
1) I suggest that you investigate and use ISPF file tailoring rather than inbuilt JCL
2) I also suggest that you read the TSO manual for the correct syntax of the submit command
3) You have constructed a queue of JCL statements. If you really do want to do it this way search the forum for INTRDR |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
You certainly have noticed the way ISPF works with its panels.
As a general rule, a panel is displayed until you END(generally PF3) or RETURN(sometimes PF4).
There are two easy ways to achieve that "display until finished" loop:
Code: |
Do Forever
"DISPLAY PANEL(mypanel)"
If RC > 0 Then Leave
/* processing here */
End |
Code: |
"DISPLAY PANEL(mypanel)"
Do While RC = 0
/* processing here */
"DISPLAY PANEL(mypanel)"
End |
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
The first ADDRESS command is superfluous:
Code: |
ADDRESS TSO;
ADDRESS "ISPEXEC" |
The rules for the ADDRESS command are:- If it is followed by a command, only this command is send to the specified environment.
for example ADDRESS ISPEXEC "DISPLAY PANEL(mypanel)" - If it has only an environment name, it becomes the new default environment.
for example, after ADDRESS ISPEXEC, you can use "DISPLAY" but "EXECIO" will fail (you have to use ADDRESS TSO "EXECIO") - If it has no parameter, it swaps back to its previous value.
For example, when accessing DB2 you can have an ADDRESS DSNREXX, followed by all EXECSQL commands and then an ADDRESS to return to whatever environment was active before.
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
It is better (IMHO) not to have all the code in one big long spaghetti but instead to have little building blocks:
Code: |
/* BUILDING BLOCK #1: DISPLAY AND DISPATCH */
Call Initial
Do Forever
"DISPLAY PANEL(mypanel)"
If RC > 0 Then Leave
Select
When SYSTEM = 'CASE1' Then Call Process_Case1
When SYSTEM = 'CASE2' Then Call Process_Case2
End
End
Call Terminal
Exit |
Code: |
/* BUILDING BLOCK #2: INITS AND PREPARATIONS */
Initial:
/* init variables, connect to DB2 and so on...*/
Return |
Code: |
/* BUILDING BLOCK #3: BEFORE LEAVING */
Terminal:
/* save variables, disconnect from DB2 and so on...*/
Return |
Code: |
/* BUILDING BLOCK #4: CASE1 */
Process_Case1:
...
Return |
Code: |
/* BUILDING BLOCK #5: CASE2 */
Process_Case2:
...
Return |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Code: |
"'SUBMIT' is not a recognized dialog service name." |
Issue TSO PROFILE MSGID from the ISPF command line. When the error occurs, it will give you a message number and you can search the messages and codes book. It might be able to help you solve the problem. |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Many Thanks to every one for taking out your time and coming up with your suggestions.
While playing out with the my code, i just tried adding address TSO before my submit command
Code: |
ADDRESS TSO "SUBMIT * END($$)" |
My code worked,but certainly not the best way. So i am trying to re built my code with ispf tailoring and following your suggestions! |
|
Back to top |
|
|
|