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: 1753
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 Batch job tunning sgandhla Testing & Performance analysis 0 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am


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