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 Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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