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
 

 

Getting a macro length error...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Tushar Sood

New User


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

PostPosted: Wed Oct 07, 2009 8:34 pm    Post subject: Getting a macro length error...
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

Moderator Team Head


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

PostPosted: Wed Oct 07, 2009 8:51 pm    Post subject: Reply to: Getting a macro length error...
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

Senior Member


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

PostPosted: Wed Oct 07, 2009 9:23 pm    Post subject: Reply to: Getting a macro length error...
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: 9
Location: New Jersey

PostPosted: Wed Oct 07, 2009 10:01 pm    Post subject: Reply to: Getting a macro length error...
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: 9
Location: New Jersey

PostPosted: Wed Oct 07, 2009 10:05 pm    Post subject:
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: 401
Location: Mumbai

PostPosted: Wed Oct 07, 2009 10:41 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Oct 08, 2009 9:57 pm    Post subject: Reply to: Getting a macro length error...
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    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 DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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