WebSphere HATS - setting a global variable to a static value in a macro

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere HATS > August 2005 > setting a global variable to a static value in a macro





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author setting a global variable to a static value in a macro
BRIAN WONG

2005-06-05, 5:45 pm

"Keith Manning" <kmanningNOSPAM@teamggi.com> wrote in message
news:<cntn43$13m2$1@news.boulder.ibm.com>...
> I need to set a global variable to a static value in a macro. Seems simple
> enough, but I can't see how to do it. BTW, the "extract action" is NOT
> what
> I need. The User and Administrator's Guide states that one of the ways you
> can set the value of a GV is "By setting a value in the macro source
> code".
> Does anyone know the syntax I would use to do this? I have searched and
> found nothing on this. Thanks!


A few months ago, the above question was asked.
I did not see any answer so I will ask again.

I tried the following:

<varupdate name="'MYGVAR'" value="12"/>

and I got an internal macro error when I tried to save.

Is it possible to update a global variable in a macro without using the
"extract" action?

thanks...


Heikki Ruohonen

2005-08-03, 2:45 am

I had a problem vice verca, I needed to reference a global variable in my
HATS macro to control the screen flow. The only way (that I understood) to
use a global variable in this case was that:
1. in an earlier macro I defined a 'fake' extract to get the global variable
initiated
2. in a business logic class I set an appropriate value to the gv created
above
3. in next macro I defined a macro variable and a 'fake' prompt to get the
gv value to the macro variable. And now I could use the macro variable in
the macro's if statement.
I wonder too if there ain't no other reasonable way to use global variables
in HATS macros than extract&prompt. (I tried to update the gv I created
above with the varupdate tag but I didn't manage)
"BRIAN WONG" <brwong@verizon.net> wrote in message
news:d3qo4i$6o0u$1@news.boulder.ibm.com...
> "Keith Manning" <kmanningNOSPAM@teamggi.com> wrote in message
> news:<cntn43$13m2$1@news.boulder.ibm.com>...
simple[vbcol=seagreen]
you[vbcol=seagreen]
>
> A few months ago, the above question was asked.
> I did not see any answer so I will ask again.
>
> I tried the following:
>
> <varupdate name="'MYGVAR'" value="12"/>
>
> and I got an internal macro error when I tried to save.
>
> Is it possible to update a global variable in a macro without using the
> "extract" action?
>
> thanks...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com