View previous topic :: View next topic
|
Author |
Message |
Tushar Sood
New User
Joined: 26 Oct 2008 Posts: 14 Location: New Jersey
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
Tushar Sood
New User
Joined: 26 Oct 2008 Posts: 14 Location: New Jersey
|
|
|
|
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 |
|
|
Tushar Sood
New User
Joined: 26 Oct 2008 Posts: 14 Location: New Jersey
|
|
|
|
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|