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 for SPUFI REPORT

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

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Mar 09, 2009 2:42 pm    Post subject: MACRO for SPUFI REPORT
Reply with quote

Hi,

Iam creating a macro for generating spufi report.
This is how i want my macro to work. I will open the SPUFI output dataset and enter
the macro name like 'MAC2'. I want the macro to remove the SPUFI generated lines.
In the report i want only one COLUMN HEADER and following should be all data.
This is my macro.
Code:
/*REXX****************************************/ 
/* EDIT MACRO - SPUFI ERROR REPORT ***********/ 
/*********************************************/ 
ADDRESS ISPEXEC                                 
    "ISREDIT MACRO"           
    "ISPEXEC CONTROL ERRORS RETURN"             
    "ISREDIT F SELECT"                           
    "ISREDIT LABEL .ZCSR = .TOP"                 
    "ISREDIT F X'5E' ALL"                       
    "ISREDIT LABEL .ZCSR = .BOTTOM"             
    "ISREDIT DELETE ALL .TOP .BOTTOM"           
                                                 
    "ISREDIT X ALL"                             
    "ISREDIT F ALL P'DSNE6==I'"                 
    "ISREDIT DELETE ALL NX"                     
    "ISREDIT RESET"                             
                                                 
    "ISREDIT ONLY '----+-----'"                 
    "ISREDIT DELETE ALL NX"         
                                   
    "ISREDIT ONLY 'EMPNO'"         
    "ISREDIT FLIP"                 
    "ISREDIT FIND FIRST 'EMPNO'"   
    "ISREDIT DELETE ALL X"         
    "ISREDIT RESET"                 
    "ISREDIT END"                   
EXIT                               


The macro which i have done is static.
Code:
  "ISREDIT ONLY 'EMPNO'"       

I want to make it a little bit dynamic by passing parameters(HEADER COLUMN INFO).

I don't know how to involve parameter variable in the macro ?
Code:
/*REXX****************************************/ 
/* EDIT MACRO - SPUFI ERROR REPORT ***********/ 
/*********************************************/ 
ADDRESS ISPEXEC                                 
    "ISREDIT MACRO(HEADER) NOPROCESS"   
    "ISPEXEC CONTROL ERRORS RETURN"             
    "ISREDIT F SELECT"                           
    "ISREDIT LABEL .ZCSR = .TOP"                 
    "ISREDIT F X'5E' ALL"                       
    "ISREDIT LABEL .ZCSR = .BOTTOM"             
    "ISREDIT DELETE ALL .TOP .BOTTOM"           
                                                 
    "ISREDIT X ALL"                             
    "ISREDIT F ALL P'DSNE6==I'"                 
    "ISREDIT DELETE ALL NX"                     
    "ISREDIT RESET"                             
                                                 
    "ISREDIT ONLY '----+-----'"                 
    "ISREDIT DELETE ALL NX"         
    "ISREDIT ONLY 'HEADER'"                                               <---------- Here parameter has to be used

    "ISREDIT FLIP"                 
    "ISREDIT FIND FIRST 'HEADER'"    <---------- Here parameter has to be used
    "ISREDIT DELETE ALL X"         
    "ISREDIT RESET"                 
    "ISREDIT END"                   
EXIT                               


How to do it ?

Thank You In Advance,
Sushanth
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: Mon Mar 09, 2009 2:44 pm    Post subject:
Reply with quote

This has been discussed quite a few times in the forum. Maybe used VGET or VPUT for your search arguments.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Mar 09, 2009 2:46 pm    Post subject:
Reply with quote

Thanks EXPAT. I will see that.

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

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Mar 09, 2009 3:12 pm    Post subject:
Reply with quote

You can pass parameters in the MACRO command itself, for example:
"ADDRESS ISREDIT 'MACRO (PARM1 PARM2) PROCESS'"

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

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Mar 09, 2009 3:23 pm    Post subject:
Reply with quote

O,

How to see the passed parameters in the SAY. To check is it receiving the correct value.
Code:

  ADDRESS ISPEXEC                     
/*ADDRESS ISPEXEC */                 
    "ISREDIT MACRO (HEADER) PROCESS"
    "ISPEXEC CONTROL ERRORS RETURN" 

When i give like this it display HEADER
Code:
SAY "HEADER"     


Thank You,
Sushanth
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Mar 09, 2009 4:43 pm    Post subject:
Reply with quote

Remove the quotes, as HEADER is a variable, not a constant literal.

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

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Mar 09, 2009 4:59 pm    Post subject:
Reply with quote

Yes. Thank You O.
I have made a few enchancements to my program.
Here is the code.

Code:
/*REXX****************************************/
/* EDIT MACRO - SPUFI ERROR REPORT ***********/
/*********************************************/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
    "ISREDIT MACRO (HEADER)"

    "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


Thank You,
Sushanth Bobby
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 Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm
No new posts Daily report to be extracted from CA ... polymathtarun DFSORT/ICETOOL 5 Mon Jul 11, 2016 4:33 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm


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