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

MACRO for SPUFI REPORT


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

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Mar 09, 2009 2:42 pm
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 09, 2009 2:44 pm
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: 1020
Location: India

PostPosted: Mon Mar 09, 2009 2:46 pm
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: 2358
Location: Israel

PostPosted: Mon Mar 09, 2009 3:12 pm
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: 1020
Location: India

PostPosted: Mon Mar 09, 2009 3:23 pm
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: 2358
Location: Israel

PostPosted: Mon Mar 09, 2009 4:43 pm
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: 1020
Location: India

PostPosted: Mon Mar 09, 2009 4:59 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts PRINTOUT macro PL/I & Assembler 0
No new posts Creating Report using SORT DFSORT/ICETOOL 7
Search our Forums:

Back to Top