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.
I have created a drill-down procedure that accepts 3 parameters:
-SET &ECHO = ON; -DEFAULT &SELECTED_REP = 'FOC_NONE'; -DEFAULT &CUR_DATE = 0; -DEFAULT &PRV_DATE = 0; -TYPE Rep Unit: &SELECTED_REP.(OR(FIND REPUNIT IN IT0307P)).Rep Unit. -TYPE Current date: &CUR_DATE.(FIND CCDATE IN IT0307P).Current date. -TYPE Previous date: &PRV_DATE.(FIND CCDATE IN IT0307P).Previous date.
If I call this procedure stand-a-lone, I got the proper values: Rep Unit: '01000159' Current date: 1080915 Previous date: 1080914
But if I drill-down from another procedure, I got this: Rep Unit: 01000159 Current date: 1080915 Previous date: 1080914
The Rep Unit from the calling procedure is also defined as ALPHA, but the contents are all digits. How do I ensure that the parameter &SELECTED_REP will always receive ALPHA values?
Thanks.
HuaThis message has been edited. Last edited by: Hua,
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008
If the parameter values overriding the default are guaranteed to be either nicely quoted values or expressions like '123456' or '12345' OR '23456' or else simple unquoted values like 123456
then adding this code should do it:
-SET &SELECTED_REP = IF EDIT(&SELECTED_REP,'9') EQ '''' THEN &SELECTED_REP ELSE '''' | &SELECTED_REP | '''';
[Toss in -? &SEL before and after to see what it's doing.]
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
One thing that you may want to look into is the .QUOTEDSTRING operator - from the manual: The QUOTEDSTRING suffix on a Dialogue Manager variable applies the following two conversions to the contents of the variable:
Any single quotation mark embedded within a string is converted to two single quotation marks.
Single quotation marks are added around the string.
Dialogue Manager commands differ in their ability to handle character strings that are not enclosed in single quotation marks and contain embedded blanks. An explicit or implied -PROMPT command can read such a string. The entire input string is then enclosed in single quotation marks when operated on by .QUOTEDSTRING.
Without seeing all of your code for the calling and called procedure it's difficult to give a more specific resolution.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I tried using your technique of the QUOTESTRING suffix and have trouble making it work.
The original codes of the calling procedure:***************************************
TABLE FILE H_CREPS PRINT 'ITMRVAL0.ITMRVAL0.ITDSAD' 'H_CREPS.SEG01.CMATTL' AS 'Total,Current,Material Costs' 'H_PREPS.SEG01.CMATTL' AS 'Total,Previous,Material Costs' 'H_PREPS.SEG01.costchg' AS 'Cost,Changed' 'H_CREPS.SEG01.CCDATE' NOPRINT 'H_PREPS.SEG01.CCDATE' NOPRINT BY 'H_CREPS.SEG01.REPUNIT' ON TABLE SUBHEAD "Run date: <+0>&DATEtMDYY <+0> " " " " " HEADING "Rep units with Material Cost Changed" "Current(FOOTING "" ON TABLE SUBFOOT "'****** END OF DATA*********'" " " WHERE ( H_PREPS.SEG01.costchg GT 1 ) OR ( H_PREPS.SEG01.costchg LT -1 ); WHERE ITMRVAL0.ITMRVAL0.STIDAD EQ 'VER'; ON TABLE SET EMPTYREPORT ANSI ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ TYPE=DATA, COLUMN=N1, FOCEXEC=app/pcc005(SELECTED_REP=N1 CUR_DATE=N6 PRV_DATE=N7), $
Portion of the pcc005 codes **********************************
-SET &ECHO = ON; -DEFAULT &SELECTED_REP = 'FOC_NONE'; -DEFAULT &CUR_DATE = 0; -DEFAULT &PRV_DATE = 0; -TYPE Rep Unit: &SELECTED_REP.(OR(FIND REPUNIT IN IT0307P)).Rep Unit. -TYPE Current date: &CUR_DATE.(FIND CCDATE IN IT0307P).Current date. -TYPE Previous date: &PRV_DATE.(FIND CCDATE IN IT0307P).Previous date. -*(Jack suggested) SET &SELECTED_REP = IF EDIT(&SELECTED_REP,'9') EQ '''' THEN &SELECTED_REP ELSE '''' | &SELECTED_REP | ''''; TABLE FILE IT0306P PRINT 'IT0306P.IT0306P.CCDATE' 'IT0306P.IT0306P.REPUNIT' 'IT0306P.IT0306P.CINBR' 'IT0306P.IT0306P.ITDSC' 'IT0306P.IT0306P.QTYPR' 'IT0306P.IT0306P.CMAT' HEADING "Current snapshot of the component costs " FOOTING "" WHERE IT0306P.IT0306P.REPUNIT EQ &SELECTED_REP; WHERE IT0306P.IT0306P.CCDATE EQ &CUR_DATE; ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE HOLD AS H_CCOMP FORMAT FOCUS INDEX 'IT0306P.IT0306P.REPUNIT' 'IT0306P.IT0306P.CINBR' ON TABLE SET HTMLCSS ON END
Hope the codes are not too confusing. Thanks.
Hua
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008
WHERE IT0306P.IT0306P.REPUNIT EQ '&SELECTED_REP'; WHERE IT0306P.IT0306P.CCDATE EQ '&CUR_DATE';
I noticed you are passing a parameter of &PRV_DATE but it does not appear in your code anywhere.
The .QUOTEDSTRING is usually only used when passing a literal value, instead of a column value so that probably is not the direction to go in this case.
I would also comment out the -TYPE statements when testing standalone and just set some appropriate default values that appear in your first report.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Just like mention what is working in this case. I tried: WHERE IT0306P.IT0306P.REPUNIT EQ &SELECTED_REP.QUOTEDSTRING or WHERE IT0306P.IT0306P.REPUNIT EQ '&SELECTED_REP' and TYPE=DATA, COLUMN=N1, FOCEXEC=app/pcc005(SELECTED_REP=N1.QUOTESTRING CUR_DATE=N6 PRV_DATE=N7), $ all the above not working.
Jack's suggestion is working perfectly for me. I just hoping the QUOTESTRING would work so that I don't have to explicitly massage the data. Anyway, my case is simply enough and happy to take it.
Hua
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008