Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Variable. SET versus DEFAULT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Variable. SET versus DEFAULT
 Login/Join
 
Member
posted
Hi all

'simple' question about variables:

 -SET &STARTTIME 		= HCNVRT(HGETC(8,'HYYMDS'),'(HYYMDS)',19,'A19'); 

works just fine

 -DEFAULT &STARTTIME 		= HCNVRT(HGETC(8,'HYYMDS'),'(HYYMDS)',19,'A19'); 

Why is it not possible to have this variable as DEFAULT value? Or how do I have to place the quotes?

Error message: MISSING OR MISPLACED QUOTE IN THE FOCEXEC ARGUMENT LINE: HYYMDS

thx, wft

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.1.0.5 (Server + Client)
Windows 2012 R2
BW, Oracle, Excel, PDF, HTML
 
Posts: 23 | Registered: May 28, 2013Report This Post
Virtuoso
posted Hide Post
I'm actually surprised -SET works because when I tried -SET &TEST=HGETC(8,'HYYMDS'); The result was a meaningless string.

Anyways, strictly speaking, I don't know if HYYMDS is a supported format in Dialogue Manager. I found this syntax in the doc which gives you the same output.

-DEFAULT &MYSTAMP = &YYMD | ' ' | EDIT(&TOD,'99:$99:$99') ;

Maybe someone in IB tech support can research why your -SET works and the same thing fails in -DEFAULT.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
quote:
-SET &TEST=HGETC(8,'HYYMDS'); The result was a meaningless string

I'm not surprised because it would be an internal datetime format - which is why it was surrounded by a conversion function using HCNVRT.

Try setting the starttime to a dummy variable and then -DEFAULT &STARTTIME to that -
-SET &DummyST 		= HCNVRT(HGETC(8,'HYYMDS'),'(HYYMDS)',19,'A19');

-DEFAULT &STARTTIME = &DummyST.EVAL

-? &START



T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
hi all, thanks for your info.

@MartinY. it is not working if you change the order (default before set, or change the variable name). you are just reading twice the set variable Wink


@Tony A, that seems to work. many thanks.

Cheers wft


WebFOCUS 8.1.0.5 (Server + Client)
Windows 2012 R2
BW, Oracle, Excel, PDF, HTML
 
Posts: 23 | Registered: May 28, 2013Report This Post
Virtuoso
posted Hide Post
quote:
Maybe someone in IB tech support can research why your -SET works and the same thing fails in -DEFAULT.


-SET and -DEFAULT operate very differently.

  • -SET treats the right-hand side as an expression to be evaluated; the resultant value is assigned to the variable.
  • -DEFAULT treats the right-hand side as a constant -- a string to be stuffed into the variable as-is.


But .EVAL can be used to modify the line of code, before the line is parsed for execution. "&var.EVAL" in a dialog manager directive causes the line of code to be revised -- changing "&var.EVAL" to whatever string-value has been assigned to &var -- before the line is parsed for execution.

Thus,
"-DEFAULT &STARTTIME = &DummyST.EVAL"
is first scanned for .EVAL phrases, and modified accordingly, and then parsed for execution. When the execution phase takes over, the line to be parsed is something like
"-DEFAULT &STARTTIME = 10:00:59"
and &STARTTIME is given a value of "10:00:59" [unless it had already received a value be means of -SET or its equivalent].


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Variable. SET versus DEFAULT

Copyright © 1996-2020 Information Builders