Using *SYSTEMVAL

David Frederick (714)969-4600 x4109 David_Frederick@WYCLIFFE.ORG
Wed, 07 Jan 1998 18:33:08 +0000 (GMT)


On 07-Jan-1998 owner-powerh-l@sphere.swau.edu wrote:

>(trying *both* lists!)
>
>O.K., I give up.  I've searched the manuals, Cognos' web site, tutorials, etc.
>There is no where I can find that states how the hell SETSYSTEMVAL and it's
>cousins GETSYSTEMVAL and DELETESYSTEMVAL are used in 7.10 QTP on OVMS 6.2.  I
>tried using them with the QUICK syntax, but I'm sure you know where that went. 
>I then tried using them within a DEFINE statement, like I finally figured out
>how to do in QUIZ (and the way the manuals *eluded* to), but the statement is
>apparently never executed?  Very short QTP example:
>
>	ACCESS MY_TABLE
>	DEFINE DUMMY_VALUE CHAR*1 = " " IF SETSYSTEMVAL("DCL_LOGNAME", "VALUE")
>	GO
>
>The logical DCL_LOGNAME is never created in any logical table.  I also 
>verified that a symbol is also not created, despite the manual stating that
>logical creation is the default.
>
>Anyone???  And if anyone knows, can you also relay where you found this out?
>
>TYVMIA,
>Rich Jesse                              Programmer/Analyst
>rjesse@qtiworld.com                     Quad/Tech International, Sussex, WI USA
>

    Something else I just thought of... your DEFINE idea would probably work 
    if you made sure to reference the defined variable somewhere.  For 
    example:
    
    	OUTPUT datafilename ADD IF DUMMY_VALUE = " "
    
    I believe QTP will not evaluate defined items that are never referenced, 
    which probably explains why your logical name was not set.  A potential 
    downside is that the logical name may be set for each transaction (I may 
    be wrong on that).
    
    Another idea, which may be the best and more flexible than a GLOBAL 
    TEMP, is to use a TEMPORARY and ITEM statement within the request you 
    want the defined value in.  Example:
    
    	TEMPORARY DUMMY_VALUE CHAR*1
    	ITEM DUMMY_VALUE = "1" IF SETSYSTEMVAL("DCL_LOGNAME, "VALUE")
    
    I haven't tried this, but it should work.
    
    To answer your last question, I believe I found the solution through 
    experimenting.  You're right... the manuals are pretty vague on the 
    topic.
    
    Thanks,
    David Frederick
    Programmer/Analyst
    Wycliffe Bible Translators USA
    Internet:  David.Frederick@wycliffe.org
    ----
    Disclaimer: Opinions expressed may not reflect those of my employer.