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.
Is there a way within WebFOCUS to create a random GUID? I know I can go ask SQL to give it to me, I know I can even call external services to give me one, but I'm attempting to do this within WebFOCUS. I've tried the following without luck.
SQL
SELECT NEWID()
We have Services that we call and they use these guids to trans a transaction. So every time we call them, we need a new GUID. Calling to SQL or another service every time to get a GUID would cause a performance issue with thousands on at a time.This message has been edited. Last edited by: GavinL,
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
I'm not a 100% sure, but I don't think there is an easy solution. I wrote a FUSE routine function to generate a UUID, but you need to write it, then compile with the openssl libraries, then deploy it etc. You could also write a JAVA plugin to generate a UUID, but you will have the same issues.
You might want to look into use your SQL option to generate a table with a set number of GUIDs, then read them - or include them - in your process 1 at a time until you have exhausted the table. Then re-gen the table and start all over again.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
SET SQLENGINE=SQLORA
ENGINE SQLORA SET DEFAULT_CONNECTION connection-name;
-RUN
SQL
SELECT SYS_GUID() AS ROW_ID FROM DUAL;
TABLE ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN
-READFILE H001
?FF H001
-TYPE ROW_ID: &ROW_ID
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
SET SQLENGINE=SQLORA ENGINE SQLORA SET DEFAULT_CONNECTION connection-name; -RUN
SQL SELECT SYS_GUID() AS ROW_ID FROM DUAL; TABLE ON TABLE HOLD AS H001 FORMAT ALPHA END -RUN
-READFILE H001
?FF H001
-TYPE ROW_ID: &ROW_ID
Yea, I would think that is a bit much since I could have thousands of people and I need a new guid for each transaction. Was hoping there was something internal that I was just missing.
Thanks guys, I guess the most inefficient way is the only way.
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
SET SQLENGINE=SQLORA
ENGINE SQLORA SET DEFAULT_CONNECTION connection-name;
SQL
SELECT SYS_GUID() AS ROW_ID FROM DUAL;
TABLE ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN
-READFILE H001
Eight lines of code that probably take 100ms to run...
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
-SET &UUID = UUID('A36');
-TYPE UUID IS &UUID
>> UUID IS 0f68060e-e8cb-4ad4-99e0-d4a811d3078f
-* or in a report/data flow ...
TABLE FILE CAR
PRINT
COMPUTE A_UUID/A36 WITH COUNTRY = UUID('A36'); AS UUID
-* COMPUTE A_MD5/A32 = STR2MD5(COUNTRY,10,'A32'); AS 'MD5 HASH'
BY COUNTRY
ON TABLE SET ASNAMES ON
END
>> Output
COUNTRY UUID
---------- ------------------------------------
ENGLAND b0aeec49-dc31-481e-bd38-7d5f312a7216
FRANCE b1a0b91a-55c0-4d0e-8a5a-66160e61daa8
ITALY c254d2e4-b221-49b9-8c08-611d479e1776
JAPAN f35641ff-61c3-4a39-84c7-51fac4e4cfe1
W GERMANY 3ebd8a30-fe6f-4810-80c0-9408116d8c4b
Hope this helps
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott