Hi every one i want to know how to how execute a REXX program in a JCL. This REXX uses ISPF and TSO services:
i write a rexx to save dataset list that statred with ucat and show their extendas and tracks of all of them and save it in a outpout dataset but when i run this via a jcl it retuned rc=0 but doesnt creat output .
**actually i want to list all dataset started with ucat* in a ps file and retrieve their extents and tracks and report the datasets that their xt is upper than 80 via batch job.
here is my rexx :
/* REXX */
/**********************************************************************/
LEVEL = "UCAT.*"
VOL =""
STATS ="YES"
GROUP = "REPORT"
SAVEDS = GROUP".DATASETS"
DSVAR =""
STATUS ="YES"
/* LMDINIT */
ADDRESS ISPEXEC "LMDINIT LISTID(LISTIDV) LEVEL("LEVEL") VOLUME("VOL")"
DO UNTIL RC<> 0
ADDRESS ISPEXEC "LMDLIST LISTID("LISTIDV") OPTION("SAVETYPE")",
"STATS("STATS") GROUP("GROUP") STATUS("STATUS")"
/* LMDFREE TO FREE UP THE DSLIST_ID ASSOCIATION */
ADDRESS ISPEXEC "LMDFREE LISTID("LISTIDV")"
IF GROUP <> "" THEN
ADDRESS ISPEXEC "EDIT DATASET("SAVEDS")"
EXIT
and my jcl code is attached.
INVOKE REXX TO BATCH JOB
-
- Posts: 3
- Joined: Tue May 28, 2024 8:55 pm
- Skillset: Mainframe beginner
- Referer: Internet search
INVOKE REXX TO BATCH JOB
You do not have the required permissions to view the files attached to this post.
- Pedro
- Posts: 686
- Joined: Thu Jul 31, 2008 9:59 pm
- Skillset: ISPF
- Referer: google
- Location: Silicon Valley
Re: INVOKE REXX TO BATCH JOB
You did not provide the actual JCL. From your screenshot, it looks like the rexx is able to run, but the ISPF is not. The ISPF product data sets should be included in the JCL in various DD statements.
re: ADDRESS ISPEXEC "EDIT DATASET("SAVEDS")"
This will not work in a batch job as the editor is normally and interactive process and 'interactive' is not available in batch. Your exec should check if the environment is batch or not and only EDIT if not batch.
re: ADDRESS ISPEXEC "EDIT DATASET("SAVEDS")"
This will not work in a batch job as the editor is normally and interactive process and 'interactive' is not available in batch. Your exec should check if the environment is batch or not and only EDIT if not batch.
Pedro Vera
- prino
- Posts: 641
- Joined: Wed Mar 11, 2009 12:22 am
- Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
- Referer: Google
- Location: Vilnius, Lithuania
- Contact:
Re: INVOKE REXX TO BATCH JOB
Pedro wrote:re: ADDRESS ISPEXEC "EDIT DATASET("SAVEDS")"
This will not work in a batch job as the editor is normally and interactive process and 'interactive' is not available in batch. Your exec should check if the environment is batch or not and only EDIT if not batch.
You will need to invoke the editor with an edit macro, i.e.
Code: Select all
ADDRESS ISPEXEC "EDIT DATASET("SAVEDS") macro(whatever)"
that ends the edit session (if in batch).
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
robert.ah.prins @ the.17+Gb.Google thingy
-
- Similar Topics
- Replies
- Views
- Last post
-
-
RC's when running a REXX exec under ISPSTART in Batch
by golemis » Thu Nov 03, 2022 5:19 pm » in TSO & ISPF - 5
- 3465
-
by golemis
View the latest post
Fri Nov 04, 2022 2:19 pm
-
-
- 7
- 5175
-
by sergeyken
View the latest post
Fri Nov 13, 2020 1:24 am
-
- 2
- 2247
-
by Terry Heinze
View the latest post
Tue Feb 15, 2022 9:13 pm
-
- 12
- 2934
-
by sergeyken
View the latest post
Mon Sep 25, 2023 3:33 am
-
- 5
- 2697
-
by Pedro
View the latest post
Sat Feb 06, 2021 4:56 am