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

MACRO error while replacing strings in some members of a PDS


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

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Wed Feb 27, 2008 9:44 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Feb 27, 2008 10:00 pm
Reply with 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.

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Feb 27, 2008 10:28 pm
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Thu Feb 28, 2008 12:55 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Feb 28, 2008 1:34 pm
Reply with quote

Again - They can be in the same PDS, but as two dictinct members.

O.
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Thu Feb 28, 2008 3:00 pm
Reply with quote

that's my first case. and i am getting error even after having macro in a separate member of pds
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 28, 2008 3:30 pm
Reply with quote

As Kevin has said, is your PDS in the SYSEXEC / SYSPROC concatenation ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Feb 28, 2008 3:30 pm
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Thu Feb 28, 2008 8:56 pm
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Thu Feb 28, 2008 9:04 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Feb 28, 2008 9:07 pm
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Thu Feb 28, 2008 9:28 pm
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Thu Feb 28, 2008 10:19 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Feb 29, 2008 10:07 am
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Fri Feb 29, 2008 2:26 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Feb 29, 2008 2:30 pm
Reply with quote

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
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Fri Feb 29, 2008 5:32 pm
Reply with quote

Can someone please help me on this ??????????
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Feb 29, 2008 5:51 pm
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 81
Location: Australia

PostPosted: Sat Mar 01, 2008 6:57 pm
Reply with quote

Thanks Enrico. Now i got it. I am really indebted to all of you.

Regards,
Charan
Think about trees before printing
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts PRINTOUT macro PL/I & Assembler 0
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top