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

Kindly help in executing a JCL from a skeleton


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
muthukrishnan K

New User


Joined: 22 Oct 2010
Posts: 2
Location: Trivandrum

PostPosted: Mon Mar 28, 2011 12:16 pm
Reply with quote

Hi

I tried to execute a sort JCL through a skeleton (I/P, O/P file and sort parameters got from the user through a panel). Below is the code

/*REXX*/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID ('USER.SNMSC9N.REXX')"
"DISPLAY PANEL(SRTPNL)"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC
"ISPEXEC LIBDEF ISPSLIB DATASET ID('USER.SNMSC9N.REXX')"
"ISPEXEC FTOPEN TEMP"
"ISPEXEC FTINCL SORT"
"ISPEXEC FTCLOSE"
"ISPEXEC VGET (ZTEMPF)"
"ISPEXEC EDIT DATASET ('"ZTEMPF"')"
ADDRESS TSO
"SUBMIT ('ZTEMPF')"
EXIT

PANEL

***************************** Top of Data ******************************
)ATTR
# TYPE(TEXT) INTENS(HIGH) SKIP(ON)
_ TYPE(INPUT) INTENS(HIGH) HILITE(USCORE)
@ TYPE(OUTPUT) INTENS(HIGH) COLOR(RED) HILITE(BLINK)
)BODY
% # ENTER THE DETAILS TO SORT #
% # INPUT FILE ==> _ZIFILE #
% # OUTPUT FILE ==> _ZOFILE #
% # START POSITION ==> _POS#
% # LENGTH ==> _LEN#
% # ASC(A) OR DESC(D) ==> _CH#
% # USERID ==> @ZUSER #
)INIT
.CURSOR = ZIFILE
)END
**************************** Bottom of Data ****************************


SORT JCL

//&ZUSERA JOB 'SORT',
// CLASS=A,MSGCLASS=Z,NOTIFY=&SYSUID
//STEP001 EXEC PGM=SORT
//SORTIN DD DSN=&ZIFILE,DISP=SHR
//SORTOUT DD DSN=&ZOFILE,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(CYL,(1,4),RLSE)
//SYSOUT DD SYSOUT=*
SYSIN DD *
SORT FIELDS = (&POS,&LEN,CH,&CH)
/*
**************************** Bottom of Data ********


when the rexx code is executed it is showing the error message as

SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011
TIME=23.37.09 SEQ=24609 CPU=0000 ASID=0305
PSW AT TIME OF ERROR 078D1000 8A419FE2 ILC 4 INTC 11
NO ACTIVE MODULE FOUND
NAME=UNKNOWN
DATA AT PSW 0A419FDC - 00301F54 1E589180 5A7AA774
AR/GR 0: 00000000/00000000 1: 00000000/0017340C



DATA SET ZTEMPF NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
***

I am a beginner to REXX so kindly bear with me if i missed anything which is very Basic

how to add this REXX to execute as TSO command.. Like TSO SRTRX
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Mar 28, 2011 2:28 pm
Reply with quote

Add
Code:
trace ?r
to you code and look at the messages. Next time post your code between
Code:
[code][/code]
tags!
Back to top
View user's profile Send private message
muthukrishnan K

New User


Joined: 22 Oct 2010
Posts: 2
Location: Trivandrum

PostPosted: Mon Mar 28, 2011 5:04 pm
Reply with quote

Hi Prino
when i used TRACE ? it was executing fine till
ISPEXEC FTOPEN TEMP but the next statement ISPEXEC FTINCL SORT throwed a Abend S0C4-X'11 and RC 20

[ERROR MSG]
IDI0001I Fault Analyzer V10R1M0 (UK62342 2010/11/18) invoked by IDIXDCAP using
SYS3.IFA.PARMLIB(IDICNF00)
DUPEXIT03 DUP EXIT INVOKED
IDI0002I Module ISPSUBS offset X'C5FE2': Abend S0C4-X'11' (Page-Translation Exc
eption)
IDI0003I Fault ID F02404 assigned in history file PDT.FAULTA.SYSC.HIST
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011
TIME=02.26.10 SEQ=40308 CPU=0000 ASID=0353
PSW AT TIME OF ERROR 078D1000 8A419FE2 ILC 4 INTC 11
***
NO ACTIVE MODULE FOUND
NAME=UNKNOWN
DATA AT PSW 0A419FDC - 00301F54 1E589180 5A7AA774
AR/GR 0: 00000000/00000000 1: 00000000/0017D40C
2: 00000000/00004040 3: 00000000/001AA4A0
4: 00000000/00000030 5: 00000000/0026B070
6: 00000000/001AB58E 7: 00000000/00000038
8: 00000000/001AA4A0 9: 00000000/00166060
A: 00000000/0A41C250 B: 00000000/0017D020
C: 00000000/8A418996 D: 00000000/0017D020
E: 00000000/8A4198B0 F: 01000002/00000000
END OF SYMPTOM DUMP
IEA848I INSTALLATION PREDUMP EXIT, IDIXDCAP, SUPPRESSED THE DUMP REQUEST
+++ RC(20) +++
[/ERROR MSG]


and the SUBMIT statement ended with RC12

[ERROR MSG]
16 *-* "SUBMIT ('ZTEMPF')"
>>> "SUBMIT ('ZTEMPF')"
DATA SET ZTEMPF NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
+++ RC(12)
+++
[/ERROR MSG]
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Mon Mar 28, 2011 5:14 pm
Reply with quote

You should also remove "CONTROL ERRORS RETURN". It may be suppressing important error messages.

ISPF Dialog test (option 7 on the primary option menu) is another excellent way to trace ISPF services.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Mar 28, 2011 5:20 pm
Reply with quote

Try changing the jcl member name to SORT1.

Change this to: "ISPEXEC FTINCL SORT1"

My first guess would be the the name SORT is used for the actual SORT program.

Also I do not know why you have this line:
"ISPEXEC EDIT DATASET ('"ZTEMPF"')"
I would remove that line.

Finally fix your qoutes on this line: "SUBMIT '"ZTEMPF"'"
ZTEMPF is a variable, thus it needs to be outside of the double quotes.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Mon Mar 28, 2011 9:41 pm
Reply with quote

I do not like this at all:
Code:
"ISPEXEC LIBDEF ISPSLIB DATASET ID('USER.SNMSC9N.REXX')"
...
"ISPEXEC FTINCL SORT"


Though it might work. The last qualifier is often used to indicate the type of members the dataset contains. I do not like mixing them... putting in a skeleton into a 'rexx' dataset.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Mar 29, 2011 12:00 am
Reply with quote

For the record, I copied and ran the same code as posted and had no problems at all. I'd suggest that the issue is something outside of the code as shown here.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Mar 29, 2011 1:50 am
Reply with quote

Quote:
how to add this REXX to execute as TSO command.. Like TSO SRTRX

Add a member to one of the datasets in your SYSPROC or SYSEXEC concatenation.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts executing XCTL command in COBOL witho... CICS 10
No new posts Receiving RC 5 when executing REXX pr... CLIST & REXX 3
No new posts Issues with executing a REXX MACRO th... TSO/ISPF 4
No new posts Get name of Subsystem routine is exec... All Other Mainframe Topics 2
This topic is locked: you cannot edit posts or make replies. Control-m JOB executing even when the... Compuware & Other Tools 6
Search our Forums:

Back to Top