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     Read Windows Environment Variable value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Read Windows Environment Variable value
 Login/Join
 
Expert
posted
Is there a method of getting Windows environment variable values into Dialogue Manager variables?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
The only way I know, and there must be a better one, is to use:

DOS SET > c:\settings.txt

and read the file with DM, picking out the ones you want.

You can also use
DOS SET name > c:\settings.txt
e.g.
DOS SET TEMP > c:\settings.txt
to pick up certain items.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Alan B,

DOS SET > c:\settings.txt works for me. Thanks.

Interestingly, when SET is executed from a Windows CMD window, any existing User variables override the System environment variables. When SET is executed from WebFOCUS, the variables are the System variables with no override.

As well, attempting to retrieve one system variable with the command DOS SET TEMP > c:\settings.txt does not work on my Win XP PC.

Thank you.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis

I believe that's me being optimistic. I forgot that to do a DOS SET TEMP > c:xxx.xxx requires the extended command processor, probably not available in WF. I think it was doable in PC/Focus!


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Alan,

The normal DOS SET command works for me. This is the fex code I used to isolate the TEMP variable:

-L1_WINNT
-*-- Determine Temp file path for Windows ------------------

DOS SET > c:\settings.txt
-RUN

FILEDEF SETTINGS DISK c:\settings.txt
-RUN

-*-- Read variable length data ---
-READ SETTINGS, &DATA

-REPEAT L1E1_WINNT WHILE &IORETURN EQ 0;

-IF &DATA CONTAINS 'TEMP=' GOTO L1E2_WINNT;

-*-- Read variable length data ---
-READ SETTINGS, &DATA

-L1E1_WINNT
-SET &FILE_PATH = 'C:\webfocus_data';
-GOTO L1E3_WINNT

-L1E2_WINNT
-SET &TEMP_PATH = GETTOK(&DATA, &DATA.LENGTH, 2, '=', 200, 'A200');
-SET &FILE_PATH = &TEMP_PATH || '\webfocus_data';
-GOTO L1E3_WINNT

-L1E3_WINNT
-SET &MKDIR_CMD = 'DOS mkdir '     | &FILE_PATH;
&MKDIR_CMD
-RUN

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
The FGETENV function retrieves the value of an environment variable and returns it as an alphanumeric string.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
-SET &TEMPDIR = FGETENV(4, 'TEMP', 200, 'A200');
-TYPE &TEMPDIR

Wonderful! Thanks, TexasStingray.

(2009/02/11 - modified the code: incorrectly coded the out-field-format as 'A' instead of 'A200'. Code tightening in v7.6 caused the FGETENV function to not return the correct TEMP directory. It should work now).

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Knew there had to be a better way, the other is a bit of a kluge.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
are these variable the the ones from the enduser or from the server?
I must give this a try next week, this would give me some nice opportunities.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Server environment settings.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 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     Read Windows Environment Variable value

Copyright © 1996-2020 Information Builders