USE statement

dmaclary@wellmanage.com dmaclary@wellmanage.com
Tue, 23 Jun 1998 13:40:59 -0400


> The USE statement in PowerHouse is limited in that it is it's own
> statement, and therefore can not be used within other statements, like
> report groups, etc.  What this means is that code can not be written once
> and reused "anywhere", which reduces code reusability and increases
> program maintenance.
> 
> For instance, in Quiz, I can...
> 
> USE FILE.GROUP
>      ITEM5 &
>      ITEM6
> 
> Where FILE.GROUP contains...
> 
> REPORT &
>     ITEM1 &
>     ITEM2 &
> 
> But, what would really be useful, is to be able to...
> 
> REPORT &
>     ITEM1 &
>     ITEM2 &
> USE FILE2.GROUP2
>     ITEM5 &
>     ITEM6
> 
> where FILE2.GROUP2 contains code that I want to reuse in a number of
> places, and the code before and after the USE changes.
> 
> One workaround that I'm experimenting with is to use VESOFT's STREAMX
> program, which does not have the PowerHouse limitation.  The problem is
> that I'd have to replace all PowerHouse USEs with STREAMX USEs and do a
> prepass on all reports with STREAMX before running them.  Here is the
> command file so far...
> 
> PARM STRMXIN,STRMXOUT
> FILE STRMFILE=!STRMXIN
> FILE STRMSAVE=!STRMXOUT;REC=-80,,F,ASCII;DISC=999999
> IF FINFO("!STRMXOUT","EXISTS") THEN
>    PURGE !STRMXOUT
> ENDIF
> ERRCLEAR
> RUN STREAMX.PUB.VESOFT;PARM=%441 > STRMXOUT
> IF HPCIERR <> 0 THEN
>    PRINT STRMXOUT;PAGE=0
> ELSE
>    PRINT !STRMXOUT
> ENDIF
> RESET STRMFILE
> RESET STRMSAVE
> 
> The input file would look like...
> 
> REPORT &
>     ITEM1 &
>     ITEM2 &
> ::USE FILE2.GROUP2
>     ITEM5 &
>     ITEM6
> 
> Has anyone else come up with workarounds to this problem?  If so, I'd like
> to hear them !!!
> 
> Regards,
> David Maclary
> 
> 
> 
> 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.