Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: ISPF batch not running - error for any Address ISREDIT comd.
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: 1746
Location: Bloomington, IL

PostPosted: Mon Nov 08, 2010 10:02 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Mon Nov 08, 2010 10:05 pm    Post subject: Reply to: ISPF batch not running - error for any Address ISR
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us