View previous topic :: View next topic
|
Author |
Message |
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Hi, I am trying to run a macro to replace some strings in some members of a PDS. but it's failing as below. i have written macro in a member of same PDS where i have REXX code. Please advise. Below is the error
Code: |
75 *-* "FREE F(INDD4 INDD5)"
>L> "FREE F(INDD4 INDD5)"
76 *-* ADDRESS ISPEXEC "EDIT DATASET('"DFILE"') MACRO(MACRO11)"
>L> "EDIT DATASET('"
>V> "CIAT.BSYS.UCC7LIB.TEST(U3DA045)"
>O> "EDIT DATASET('CIAT.BSYS.UCC7LIB.TEST(U3DA045)"
>L> "') MACRO(MACRO11)"
>O> "EDIT DATASET('CIAT.BSYS.UCC7LIB.TEST(U3DA045)') MACRO(MAC
RO11)"
IKJ56500I COMMAND MACRO11 NOT FOUND
*** |
it's getting into dataset as below
Code: |
EDIT CIAT.BSYS.UCC7LIB.TEST(U3DA045) - 01.00 Macro does not exist
Command ===> MACRO11 Scroll ===> CSR
****** ***************************** Top of Data ******************************
==MSG> -Warning- The UNDO command is not available until you change
==MSG> your edit profile using the command RECOVERY ON.
==MSG> -CAUTION- Profile is set to STATS ON. Statistics did not exist for
==MSG> this member, but will be generated if data is saved.
000001 //B2DA045 JOB (XXXX,XXXX,XXXXXXXX),' POSTING',MSGCLASS=4,CLASS=U,
000002 // REGION=128M
000003 //* |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
A macro should exist in an approved macro library, which has to be allocated to either the SYSPROC DD or to the SYSEXEC DD.
Use the TSO ISRFIND command to find the member in your ISPF library concatenation. It should exist in a library that's allocated to one of the two above DD names. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
The edit macro should be saved as a seperate member from the calling REXX. They can't be in the same member (think of it a little bit and you will understand why is that). |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Hi Kevin, i have Macro as member in the same PDS as of calling REXX and is allocated to SYSEXEC DD. I will now try as per ofer with member in different PDS but how do i allocate this in my JCl ?? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Again - They can be in the same PDS, but as two dictinct members.
O. |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
that's my first case. and i am getting error even after having macro in a separate member of pds |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
As Kevin has said, is your PDS in the SYSEXEC / SYSPROC concatenation ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
A macro should exist in an approved macro library, which has to be allocated to either the SYSPROC DD or to the SYSEXEC DD
|
you can issue 'TSO LISTALC' and then look at the libs allocated to sysproc or sysexec. if the library containing your 'macro' is not in the list, that is your problem. |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Hi Dick,
you are correct i am not able to see my library having macro in the list. Please let me know how to allocate it ?? |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Hi Dick Brenholtz,
Thanks a lot. i allocated my rexx pds from TSO and it's working now. I am really indebted for all of your kind help. Thank you all. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
1. What you should be doing - use the exisiting site-designated libraries for your code.
2. Have your personal libraries permanently added to the list of concatenated datasets during the logon to TSO.
3. Use the TSO ALTLIB command to temporarily modify the library concatenations during your TSO session. |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Thanks a lot Kevin. I have one more question. Is it possible to pass variables from my rexx to calling macro ?? If yes, please guide me with the details.. |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Also, i can notice that macro is not running when i submit rexx code in batch and i don't even get any error. i have given the JCL below. but macro works fine if i execute the same rexx code through TSO by giving EXEC command against member.
Code: |
//*
//STEP010 EXEC PGM=IKJEFT1A
//SYSPROC DD DSN='CIAT.MYPDS.REXX',DISP=SHR /* REXX SOURCE PDS */
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSIN DD *
%MYREXX01
|
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Answer 1: Use the PARM keyword.
Answer 2: Since you are using ISPF service, you need to allocate ISPF libraries to your job. Look for examples in this forum and in the fine manual.
O. |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Thanks ofer. but ISPF library 'CIAT.MYPDS.REXX',DISP=SHR have already been allocated to job as seen in the JCL which contains macro as a member. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
charanmsrit wrote: |
Thanks ofer. but ISPF library 'CIAT.MYPDS.REXX',DISP=SHR have already been allocated to job as seen in the JCL which contains macro as a member. |
the point ofer was trying to make is that..
in order to take advantage of any ISPF service ( Address ISPEXEC/IREDIT)
You need to allocate the full set of ISPF libraries and run Your clist/rexx script
using :
Code: |
ISPSTART CMD(Your_clist/rexx) |
|
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Can someone please help me on this ?????????? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
ok! ok! but You' ll have also to help Yourself
go to this url
http://www.sillysot.com/mvs/
and download the "BATCHPDF" tool
it is rexx script which will build a job for batch execution of ISPF
with the same allocations as Your online tso session
addt to the sysproc concatenation the dataset containing Your rexx scripts,
use a little bit of imagination and there You go |
|
Back to top |
|
|
charanmsrit
New User
Joined: 25 Oct 2007 Posts: 81 Location: Australia
|
|
|
|
Thanks Enrico. Now i got it. I am really indebted to all of you.
Regards,
Charan
Think about trees before printing |
|
Back to top |
|
|
|