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

Getting a macro length error...


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

New User


Joined: 26 Oct 2008
Posts: 14
Location: New Jersey

PostPosted: Wed Oct 07, 2009 8:34 pm
Reply with quote

I'm writing code to replace the dataset contents with other data.

below is the code for executing it.

ISPEXEC EDIT DATASET('DATASET') MACRO('DATASET')

On execution i am getting the following error:-

Invalid length
Parameter 'MACRO' exceeds the allowable length.

My dataset to be edited is in different PDS & the macro is in different one.

Is there any way to solve this issue or we need to have the macro in the same PDS as the dataset is in.

Thanks...
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Oct 07, 2009 8:51 pm
Reply with quote

MACRO is the name of the macro, which needs to exist in your site's defined library for ISPF Edit Macros.

See the ISPF EDIT Service documentation for further reference.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Oct 07, 2009 9:23 pm
Reply with quote

Quote:

MACRO is the name of the macro,


Macro is a member of a PDS. In the MACRO parameter, you specify only the member name. And as SuperK mentions, the member has to already reside in a macro library, typically SYSPROC or SYSEXEC.

Quote:
below is the code for executing it.

ISPEXEC EDIT DATASET('DATASET') MACRO('DATASET')

No, you did not show us the actual code.
Back to top
View user's profile Send private message
Tushar Sood

New User


Joined: 26 Oct 2008
Posts: 14
Location: New Jersey

PostPosted: Wed Oct 07, 2009 10:01 pm
Reply with quote

Actually,

I was able to execute my macro from my PDS by using the altlib command ( i guess it adds your PDS also to the system library)

When i had the macro & the dataset to be edited in the same PDS, i was able to execute it.

But to make it more generalised i thought of having the macros in different PDS.
So i tried using macro form different PDS.

But if we can only specify the member name in MACRO name, then i will have to have both in the same PDS.

Thanks....
Back to top
View user's profile Send private message
Tushar Sood

New User


Joined: 26 Oct 2008
Posts: 14
Location: New Jersey

PostPosted: Wed Oct 07, 2009 10:05 pm
Reply with quote

Pedro,

I am sorry...you are correct its not the entire code.

I had copied the entire code, dont know how it got messed up.

The actual code is:-

DATASET = "JOBS.JCL(ISREDIT)"
DATSET1="REXX1.JCL(ISRMACRO)"
ISPEXEC EDIT DATASET('DATASET') MACRO('DATASET1')
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Wed Oct 07, 2009 10:41 pm
Reply with quote

As mentioned, it should be 'DATASET1="ISRMACRO"'
One adcitional item... It is best not to start your own programs with ISP or ISR because (1) it looks like part of ISPF and causes maintenance to be confusing, and (2) ISPF itself may perform differently when a program starts with ISR or ISP. The ispf services guide says
Quote:
Dialog developers should avoid the ISP and ISR prefixes (the DM and PDF component codes) in naming dialog functions. Special linkage conventions, intended only for internal ISPF use, are used to invoke programs named "ISPxxxxx" and "ISRxxxxx."
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Oct 08, 2009 9:57 pm
Reply with quote

Quote:
The actual code is:-

DATASET = "JOBS.JCL(ISREDIT)"
DATASET1 = "ISRMACRO"
ISPEXEC EDIT DATASET('DATASET') MACRO('DATASET1')


Sorry, still not your code. Even with changing DATSET1 to DATASET1 and using the correct macro name, I get a different error than you. I get:

Code:
IRX0043I Error running TEMP32, line 6: Routine not found 


Your use of quotes prevents the variables from being resolved.
I suggest you add quotes around your host command
Code:

Address ISPEXEC
"EDIT DATASET("DATASET") MACRO("DATASET1")
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 Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
Search our Forums:

Back to Top