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
 

 

MACRO error while replacing strings in some members of a PDS

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

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Wed Feb 27, 2008 9:44 pm    Post subject: MACRO error while replacing strings in some members of a PDS
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

Moderator Team Head


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

PostPosted: Wed Feb 27, 2008 10:00 pm    Post subject: Reply to: MACRO error
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: 2360
Location: Israel

PostPosted: Wed Feb 27, 2008 10:28 pm    Post subject:
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: 80
Location: Australia

PostPosted: Thu Feb 28, 2008 12:55 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Thu Feb 28, 2008 1:34 pm    Post subject:
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: 80
Location: Australia

PostPosted: Thu Feb 28, 2008 3:00 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Feb 28, 2008 3:30 pm    Post subject:
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    Post subject:
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: 80
Location: Australia

PostPosted: Thu Feb 28, 2008 8:56 pm    Post subject:
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: 80
Location: Australia

PostPosted: Thu Feb 28, 2008 9:04 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Feb 28, 2008 9:07 pm    Post subject: Reply to: MACRO error while replacing strings in some member
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: 80
Location: Australia

PostPosted: Thu Feb 28, 2008 9:28 pm    Post subject:
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: 80
Location: Australia

PostPosted: Thu Feb 28, 2008 10:19 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Fri Feb 29, 2008 10:07 am    Post subject:
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: 80
Location: Australia

PostPosted: Fri Feb 29, 2008 2:26 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Feb 29, 2008 2:30 pm    Post subject:
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: 80
Location: Australia

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

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Feb 29, 2008 5:51 pm    Post subject: Reply to: MACRO error while replacing strings in some member
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: 80
Location: Australia

PostPosted: Sat Mar 01, 2008 6:57 pm    Post subject:
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    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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


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