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
 

 

Issuing ISREDIT MACRO cmd to a member from another REXX pgm

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

New User


Joined: 23 Jan 2009
Posts: 14
Location: Bangalore

PostPosted: Wed Feb 04, 2009 4:17 pm    Post subject: Issuing ISREDIT MACRO cmd to a member from another REXX pgm
Reply with quote

Hi Frnds,

I want to issue the ISREDIT MACRO command to a member from another REXX program. I'm using the below stmt to issue the command. But its opening the member in view mode and issuing.

"ISPEXEC VIEW DATAID(&DSNM) MEMBER("MEM") MACRO(PREP)"

I wanted this to be done without opening the member physically.

Any suggestions are welcome
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: Wed Feb 04, 2009 4:23 pm    Post subject:
Reply with quote

Post the macro code
Back to top
View user's profile Send private message
Arun Kumar S

New User


Joined: 23 Jan 2009
Posts: 14
Location: Bangalore

PostPosted: Wed Feb 04, 2009 5:01 pm    Post subject: Reply to: Issuing ISREDIT MACRO cmd to a member from another
Reply with quote

The below code is to PREP all the jcls in a jcllib and to create the GDG's which is not created
Code:

/* REXX */                                                             
MYPDS = OFRT.TT.FOOD.HOFFR.EXTR.JCLLIB                                 
LIMIT = 10                                                             
"ISPEXEC LMINIT DATAID(DSNM) DATASET('"MYPDS"') ENQ(SHR)"               
"ISPEXEC LMOPEN DATAID(&DSNM) OPTION(INPUT)"                           
DO FOREVER                                                             
  "ISPEXEC LMMLIST DATAID(&DSNM) OPTION(LIST) MEMBER(MEM) STATS(YES)"   
  IF RC <> 0 THEN LEAVE                                                 
  CALL PREP                                                             
END                                                                     
"ISPEXEC LMCLOSE DATAID(&DSNM)"                                         
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
PREP:                                                                   
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
MEM = STRIP(MEM,B)                                                     
/* "JCLPREP '"MYPDS"("MEM")'" */                                       
"ISPEXEC VIEW DATAID(&DSNM) MEMBER("MEM") MACRO(PREP)"                 
CALL CGDG                                                               
RETURN                                                                 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
CGDG:                                                                   
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
DSNAME = USERID() || .JCLPREP.REPORT                                   
DSNIN. = ' '                                                           
GDGIN. = ' '                                                           
J=0                                                                     
"ALLOC DA('"DSNAME"') F(INFILE) SHR"                                   
"EXECIO * DISKR INFILE (FINIS STEM DSNIN."                             
"FREE F(INFILE)"                                                       
DO I=1 TO DSNIN.0                                                       
SP = POS('0JCP0546E',DSNIN.I)                                           
IF SP > 0 THEN DO                                                       
   I = I+1                                                             
   J = J+1                                                             
   REC = DSNIN.I                                                       
   PARSE VAR REC WITH DUM1 "'" GDGNAME "(" DUM2 ")"                     
   GDGIN.J = GDGNAME                                                   
END                                                                     
END                                                                     
DO I = 1 TO J                                                           
   GDGNAME = GDGIN.I                                                   
   X=OUTTRAP(LST.)                                                     
   " LISTC ENT('"GDGNAME"')"                                           
   X=OUTTRAP(OFF)                                                       
   IF RC \= 0 THEN                                                     
     DO                                                                 
      "DEFINE GDG (NAME('"GDGNAME"') LIMIT("LIMIT")",                   
         "SCRATCH"                                                     
      IF RC = 0 THEN                                                   
         SAY GDGNAME 'IS CATALOGED'                                     
/*       ZEDSMSG = 'GDG BASE CREATED' */                               
      ELSE                                                             
         SAY GDGNAME 'CATALOG FAILED RC='RC                             
/*       ZEDSMSG = 'GDG BASE FAILED RC='RC */                           
     END                                                               
   ELSE                                                                 
     SAY GDGNAME 'IS ALREADY IN CATALOG'                               
END                                                                     
RETURN
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: Wed Feb 04, 2009 5:14 pm    Post subject:
Reply with quote

So where is the code for the macro PREP ???
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 04, 2009 5:18 pm    Post subject:
Reply with quote

Just a guess - do you have "ADDRESS ISREDIT END" at the end of your macro?

O.
Back to top
View user's profile Send private message
Arun Kumar S

New User


Joined: 23 Jan 2009
Posts: 14
Location: Bangalore

PostPosted: Wed Feb 04, 2009 5:45 pm    Post subject: Reply to: Issuing ISREDIT MACRO cmd to a member from another
Reply with quote

No i cannto post the code for PREP as this is Licensed code.

Please tell me if there is anyother way to issue the MACRO command to a member. Other than the blow,

"ISPEXEC VIEW DATAID(&DSNM) MEMBER("MEM") MACRO(PREP)"

I wanted to open the member logically and issue the MACRO command.

Thanks in advance
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 04, 2009 5:48 pm    Post subject:
Reply with quote

There is no such thing as opening a dataset "logically": You either open the dataset or not...However, you can "open and close" if you use my suggestion above.

O.
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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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