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     Replace &APPROOT with something workable in version 766

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Replace &APPROOT with something workable in version 766
 Login/Join
 
Gold member
posted
Hi,
I'm testing some of our version 5.3.2 code in version 7.6.6 Studio before it can be migrated.
In one of the focus executables, when I run it in v766, I get this error message. I checked it in v766 Studio to be:
? 2905
0(FOC2905) &VARIABLE IS NOT ALLOWED AS A FILENAME IN THIS CONTEXT:
When operating under WFDESCRIBE, there are restrictions on where
an &VAR or &&VAR may be used. -INCLUDE is one of those cases.

How do I replace &APPROOT or change the code to make it work in v766? Here's the code:


-SET &ECHO=ALL;
SET XRETRIEVAL = ON
SET NODATA = ' '
-DEFAULT &DCN = ' '
-DEFAULT &OUTPUT = 'HTML';
-*
-SET &REP_NAME = 'Search By Document Control Number (DCN) Report';
-SET &RUN_DATE = &DATEMtrDYY;
-SET &RUN_TIME = EDIT(HHMMSS('A8'),'99$:99$:99');
-SET &ORIENTATION = 'PORTRAIT';
-SET &DCN = &PARM_DCN;
-*SET &OUTPUT = 'HTML';
-*
-INCLUDE SQLCONF
SQL
-MRNOEDIT -INCLUDE &APPROOT/dlhc/qry1.sql
TABLE ON TABLE HOLD AS QY1
END
TABLE FILE QY1
HEADING
"DL Card and Health Card Contract Management "
"Search By Document Control Number (DCN) Report"
" "
PRINT
E01
E02
E03
E04
E05
E06
ON TABLE NOTOTAL
ON TABLE SUBFOOT
" "
"Report ID: QRY1 / <+0>&DATEtrMDYY <+0> at &TOD / Page ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT '&OUTPUT'
ON TABLE SET CSSURL '/approot/mtomis/report.css'
ON TABLE SET STYLE *
-*
-GOTO STY_&OUTPUT.EVAL
-*
-STY_HTML
-STY_EXL2K
-MRNOEDIT -INCLUDE STYLE01
-GOTO STY_END
-*
-STY_PDF
-MRNOEDIT -INCLUDE STYLE021
-*
-STY_EXCEL
-STY_END
ENDSTYLE
END
-RUN
-*
-IF &LINES GT 0 GOTO REPORT_END;
-*
-NO_DATA
-MRNOEDIT -INCLUDE MISI200
-*
-REPORT_END


When I put the -MRNOEDIT in front of 5 other similarly coded fexes they work fine. The 4 online queries that we have like the one above do not work with this approach.
Here's one that worked fine when I used this approach:


-SET &ECHO=ALL;
-*SET EMPTYREPORT = ON
SET NODATA = ' '
SET XRETRIEVAL = ON
-DEFAULT &STATUS_CODE = 'DEST';
-DEFAULT &CARDTYPE_CODE = 'DLCARD_V1';
-DEFAULT &FROM_DATE = '20071101';
-DEFAULT &TO_DATE = '20071130';
-DEFAULT &ADATE1='20071101';
-DEFAULT &ADATE2='20071130';
-DEFAULT &ADIM1 = 'DLCARD_V1'
-DEFAULT &OUTPUT = 'HTML';
-*
-SET &REP_NAME = 'DCN Destroyed Report';
-SET &RUN_DATE = &DATEMtrDYY;
-SET &RUN_TIME = EDIT(HHMMSS('A8'),'99$:99$:99');
-SET &ORIENTATION = 'PORTRAIT';
-*
-SET &ADIM1_TEXT=
- DECODE &ADIM1(
- 'HCARD_V1' 'HCARD_V1'
- 'DLCARD_V1' 'DLCARD_V1'
- ELSE ' ');
-*
-SET &CARDTYPE_CODE = IF &ADIM1_TEXT EQ 'HCARD_V1' THEN 'HCARD_V1' ELSE
- IF &ADIM1_TEXT EQ 'DLCARD_V1' THEN 'DLCARD_V1' ELSE ' ';
-*
-SET &HEADING_CARD = IF &CARDTYPE_CODE EQ 'HCARD_V1' THEN 'Health Card' ELSE
- IF &CARDTYPE_CODE EQ 'DLCARD_V1' THEN 'Driver Licence Card';
-*
-SET &FROM_DATE = EDIT(&ADATE1,'9999-99-99');
-SET &TO_DATE = EDIT(&ADATE2,'9999-99-99');
-SET &ADATE1TEXT = LCWORD(17,CHGDAT('YYMD', 'MXDYY', &ADATE1, 'A17'), 'A17');
-SET &ADATE2TEXT = LCWORD(17,CHGDAT('YYMD', 'MXDYY', &ADATE2, 'A17'), 'A17');
-*
-INCLUDE SQLCONF
SQL
-MRNOEDIT -INCLUDE &APPROOT/dlhc/er1.sql
TABLE ON TABLE HOLD AS R1
END
TABLE FILE R1
PRINT
CARD_DCN AS 'DCN #s'
CS_EFFECTIVE_DT AS 'Date Destroyed'
OI_DL AS 'Driver Licence #'
OI_IDENTIFIER AS 'Order Item Identifier'
ON TABLE NOTOTAL
HEADING
"DL Card and Health Card Contract Management"
"DCN Destroyed Report"
"Card Type: <+0> &HEADING_CARD"
"From: &ADATE1TEXT.EVAL To: &ADATE2TEXT.EVAL"
" "
-*FOOTING
-*" "
ON TABLE SUBFOOT
"Report ID: ER1 / Date: &RUN_DATE / Time: &RUN_TIME / Page ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT '&OUTPUT'
ON TABLE SET CSSURL '/approot/mtomis/report.css'
ON TABLE SET STYLE *
-*
-GOTO STY_&OUTPUT.EVAL
-*
-STY_HTML
-STY_EXL2K
-MRNOEDIT -INCLUDE STYLE01
-GOTO STY_END
-*
-STY_PDF
-MRNOEDIT -INCLUDE STYLE021
-*
-STY_EXCEL
-STY_END
ENDSTYLE
END
-RUN
-*
-IF &LINES GT 0 GOTO REPORT_END;
-*
-NO_DATA
-MRNOEDIT -INCLUDE MISI200
-*
-REPORT_END


Thank you.


WF V7.7.03
Platform: AIX 6.1 64-bit, WinXP, IE 8.0
Output Formats: Html, Pdf, Excel
 
Posts: 71 | Registered: October 16, 2006Report This Post
<JG>
posted
quote:
-MRNOEDIT -INCLUDE &APPROOT/dlhc/qry1.sql


change it to

-SET &INCL1= '-MRNOEDIT -INCLUDE &APPROOT.EVAL/dlhc/qry1.sql';
&INCL1.EVAL
 
Report This Post
Virtuoso
posted Hide Post
Your code gets scanned four times:
1. in MR, if applicable.
2. in WF reporting server, by a pre-scanner that determines if any &vars need autoprompting
3. in WF reporting server, by the dialog manager processor (performs & var substitition and stacks Focus commands for execution).
4. in WF reporting server, by the (Web)Focus command processor (executing the stacked code)

The message comes from #2. Th server wants to expand the -INCLUDE's to see if their use of &vars will require prompting. But it doesn't evaluate & vars, so it cannot pursue your -INCLUDE.

JG's .EVAL ploy obscures the -INCLUDE from WFDESCRIBE, and also from MR's pre-scan, so the -MRNOEDIT becomes extraneous.

I think you can get by, simply by hiding the -INCLUDE keyword:
-SET &include= '-INCLUDE';
&include.EVAL &APPROOT/dlhc/qry1.sql
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
Yes, the second suggestion worked as specified. Thank you j.gross,
Rgds.


WF V7.7.03
Platform: AIX 6.1 64-bit, WinXP, IE 8.0
Output Formats: Html, Pdf, Excel
 
Posts: 71 | Registered: October 16, 2006Report 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     Replace &APPROOT with something workable in version 766

Copyright © 1996-2020 Information Builders