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.
Definitely not a silly question (and I don't think you would ever ask one!)
I have tried that, and I get (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: @@@@0016 BYPASSING TO END OF COMMAND
Thanks for the suggestion though.
I have found a way using REFCURSOR such that I can get the string into an amper variable when accessing the data from a table in the PL/SQL procedure. And for this particular problem, I can get it to work using select of encrypt(p_password) from DUAL, but I find that very clumsy.
So I'm still hoping to find a more straightforward way to do this. It must exist!!
Thanks, Sean
------------------------------------------------------------------------ PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
Posts: 210 | Location: Ottawa | Registered: November 03, 2005
I reread the section on the Oracle adapter that you referred to (I had a copy from the Tech Support section which also contained an example), and it looks like I can only accomplish this with the cursor method. In other words, I can't just assign a value to a variable and process it in WF. Although as indicated above, I do get a line of text containing the string that I had hoped to be able to assign into an amper variable, so it's unfortunate I can't access it!
Thanks again, Sean
------------------------------------------------------------------------ PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
Posts: 210 | Location: Ottawa | Registered: November 03, 2005
SQL SQLORA EX MRS_SEC.PASSWORD_ENCRYPTION2.GET_ENCRYPTED_PASSWORD '&PASSWORD', ?; END
In my experience one should write:
SQL SQLORA
EX MRS_SEC.PASSWORD_ENCRYPTION2.GET_ENCRYPTED_PASSWORD '&PASSWORD';
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SMITHS
END
TABLE FILE SMITHS
PRINT *
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Yeah, I thought that something like that should work. I modified your version slightly to include the '?' (because it failed with lack of parameters otherwise) that is required for the return parameter, plus I've changed the proc name slightly:
-SET &PASSWORD = 'XX';
SQL SQLORA SET SERVER MRS_SEC
SQL SQLORA
EX MRS_SEC.PASSWORD_ENCRYPTION2.XX_GET_ENCRYPTED_PASSWORD '&PASSWORD', ?;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SMITHS
END
TABLE FILE SMITHS
PRINT *
END
I get the following error:
(FOC1400) SQLCODE IS 6550 (HEX: 00001996)
: ORA-06550: line 1, column 67:
: PLS-00103: Encountered the symbol ")" when expecting one of the
: following:
: ( - + case mod new not null others
: avg
: count current exists max min prior sql stddev sum variance
: execute forall merge time timestamp interval date
:
: pipe
:
(FOC1405) SQL PREPARE ERROR.
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SMITHS
BYPASSING TO END OF COMMAND
I was able to get it working with the following code:
-SET &ECHO = ALL;
SQL SQLORA SET SERVER MRS_SEC
SQL SQLORA
EX MRS_SEC.PASSWORD_ENCRYPTION2.get_encrypted_password 'SMITHS';
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS H_ENCRYPT
END
-RUN
DEFINE FILE H_ENCRYPT
ENCRYPT_PSWD/A32 = EDIT(PASSWORD_ENCRYPTION2_ENCRYPT_:B, '99999999999999999999999999999999');
END
TABLE FILE H_ENCRYPT
PRINT ENCRYPT_PSWD
ON TABLE HOLD AS H_2
ON TABLE SET ASNAMES ON
END
-RUN
-READ H_2 &ENCRPTPSWD.A32
-SET &ENCRPTPSWD = TRUNCATE(&ENCRPTPSWD);
-TYPE ENCRPTPSWD: (&ENCRPTPSWD)
against this PL/SQL procedure:
PROCEDURE get_encrypted_password (
p_password VARCHAR2,
c_histtable OUT rectype
)
IS
BEGIN
OPEN c_histtable FOR SELECT encrypt(p_password)
FROM dual
;
END;
A bit kludgey, but it seems to work.
But I would prefer something simple like you suggested would work without the need for a cursor in the PL/SQL proc.
Thanks for your time! SeanThis message has been edited. Last edited by: smiths,
------------------------------------------------------------------------ PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
Posts: 210 | Location: Ottawa | Registered: November 03, 2005