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

ISPF batch not running - error for any Address ISREDIT comd.


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

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Mon Nov 08, 2010 9:56 pm
Reply with quote

Hi!

I'm trying to run edit macros in ISPF batch and receive RC=20 on any command right after Address ISREDIT.
This is macro:
/*REXX*/
X = LISTDSI(FILE01 FILE)
trace ?I
IF X = 0 THEN
DO
Address ISREDIT
"MACRO"
"EDIT DATASET('"SYSDSNAME"')"
"X 'SOURCE' ALL"
"delete NX ALL"
"SAVE"
"END"
end
else
say 'File name invalid'

exit

This is displays on SDSF:
READY
PROFILE PREFIX(RMD0142)
READY
ISPSTART CMD(%TEMP) NEWAPPL(ISR)
4 *-* IF X = 0
>V> "0"
>L> "0"
>O> "1"
IRX0100I +++ Interactive trace. TRACE OFF
*-* THEN
5 *-* DO
6 *-* Address ISREDIT
7 *-* "MACRO PROCESS"
>L> "MACRO PROCESS"
+++ RC(20) +++
8 *-* If rc = 0
>V> "20"
>L> "0"

Any command after receives same RC=20.
What I'm doing wrong?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Nov 08, 2010 10:02 pm
Reply with quote

I believe that the EDIT command is properly addressed to ISPF, not the Edit service itself,and would therefore be coded as:
Code:

address ispexec "EDIT DATASET('" || sysdsname || "') MACRO(macro_name)"
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Nov 08, 2010 10:05 pm
Reply with quote

I'm confused.

If the dataset exists (checked by the LISTDSI function), then you call an ISPF Edit Service, but you haven't shown where you pass it the name of the ISPF Edit Macro.
Back to top
View user's profile Send private message
vd120

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Mon Nov 08, 2010 10:11 pm
Reply with quote

Superk,

This is probably where one of my problems is. I was under impression that once I issue "EDIT DATASET('"SYSDSNAME"')" command the rest of commands (Find, exclude....) will be issued against this dataset. But why I received RC=20 on MACRO? This is before I issue EDIT command.
Back to top
View user's profile Send private message
vd120

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Mon Nov 08, 2010 10:23 pm
Reply with quote

Akatsukami,

you were right, once I change my code per your instruction it works!

Thank you.
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 Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
Search our Forums:

Back to Top