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
 

 

JCL calling REXX, REXX calls edit macro which accepts parame

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Jul 31, 2009 5:00 pm    Post subject: JCL calling REXX, REXX calls edit macro which accepts parame
Reply with quote

Hi,

Following is my rexx code. I will be calling this rexx from a JCL. The edit macro which i wrote accepts parameters and works accordingly.
Now, dataset opens says "string not found".
Where did i make the mistake, when passing the parameter or in the edit macro ?


Code:
/* REXX  *********************************/                 
/* MACRO STARTER  MACRO IS A SEPARATE PRG*/                 
/*************************REXX************/                 
/*DSN=HXSULL.QUERY.REPEXCP */                               
ADDRESS ISPEXEC                                             
  USER = USERID()                                           
  TRACE I                                                   
PARM = "SSID  INTERVAL_START"                               
"ISPEXEC VPUT (PARM) PROFILE"                               
"ISPEXEC EDIT DATASET('HXSULL.QUERY.REPEXCP') MACRO (MAC2)" 
EXIT                                                         



MAC2 macro
Code:
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"     
    "ISREDIT MACRO (HEADER)"               
                                           
/*  "ISREDIT TOP"*/                         
    "ISREDIT F ALL '------'"               
    "ISREDIT F SELECT"                     
    "ISREDIT (TOP) = CURSOR"               
    "ISREDIT LABEL .ZCSR = .TOP"           
                                           
    "ISREDIT F X'5E' ALL"                   
    "ISREDIT (BOTTOM) = CURSOR"             
     SELECT                                 
      WHEN TOP=BOTTOM THEN                 
      DO                                   
        "ISREDIT DELETE ALL .TOP .TOP"     
      END                                   
      OTHERWISE                             
      DO                                   
        "ISREDIT LABEL .ZCSR= .BOTTOM"     
        "ISREDIT DELETE ALL .TOP .BOTTOM"   
      END                                   
     END                                     
                                             
    "ISREDIT X ALL"                         
    "ISREDIT F ALL P'DSNE6==I'"             
    "ISREDIT DELETE ALL NX"                 
    "ISREDIT RESET"                         
                                             
    "ISREDIT ONLY '----+-----'"             
    "ISREDIT DELETE ALL NX"                 
    "ISREDIT ONLY "HEADER""                 
    "ISREDIT FLIP"                           
    "ISREDIT FIND FIRST "HEADER""           
    "ISREDIT DELETE ALL X"                   
    "ISREDIT RESET"                         
/*  "ISREDIT END" */                         
EXIT                                         


Sushanth
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1028
Location: Oostende, Belgium

PostPosted: Fri Jul 31, 2009 5:12 pm    Post subject:
Reply with quote

You didn't read manual SC34-4819-07.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Jul 31, 2009 5:49 pm    Post subject:
Reply with quote

Prino,

Is the mistake in VPUT, manual says 'specifies one or more dialog variables'. What iam passing is not a diaglog variable. Its just a variable. So, ISPFEXEC is opening the dataset, and running macro till the parameter line. So, according to the macro no parameters are being passed. So, it says "STRING NOT FOUND". And, I can remove that VPUT line. Now, how am i gonna pass the parameter ?

A help would be helpful.

Sushanth
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1028
Location: Oostende, Belgium

PostPosted: Fri Jul 31, 2009 6:18 pm    Post subject:
Reply with quote

Go and RTFM, SC34-4819-07, it explains everything!
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Jul 31, 2009 6:42 pm    Post subject:
Reply with quote

Code:
PARM(PARM)


Thank You, Got it.

Sushanth
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Sat Aug 01, 2009 1:53 am    Post subject:
Reply with quote

Hi Sushanth,
Apparently, you need a little bit more guidance.

You use VPUT to store a value into a "pool", then you have to retrieve it later by using a VGET.
If you don't use VGET then don't use VPUT.

You don't use the USER variable, you can throw it away too.

You have TRACE I in your rexx, so you must know what it does.
Use it in your macro too.

I don't see the "/* REXX */" a the beginning of the macro.

As you modify an edited file, you should terminate with an explicit "SAVE" or "CANCEL".
This will remove any doubt.

And what happens if the string is not found? You never check any RC.
I think you should..
BTW, when a string is not found, the message "string not found" shows. How weird.

ONLY is not a standard ISPF edit command. It is certainly a local macro.
(I bet it has x all followed by find all)

Once you've finished to RTFM this book recommended by prino, you should RTFM this one...
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Aug 03, 2009 2:42 pm    Post subject:
Reply with quote

Thank you for your guidance MARSO.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Passing data from REXX to C programme... chong.zhou All Other Mainframe Topics 0 Wed Jul 26, 2017 4:55 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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