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     [SOLVED] Dash READFILE Doesn't read all variables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Dash READFILE Doesn't read all variables
 Login/Join
 
Guru
posted
In the example below, only the last variable is set using READFILE.

This should work, I copied it from another procedure, but something is wrong and I just can't find it. Hoping for a an idea or two.

Thanks in advance.


 -SET &ECHO = ALL;

-DEFAULTH &CURRENT_VALUE = _FOC_NULL;
-DEFAULTH &LAST_VALUE = _FOC_NULL;
-DEFAULTH &PAST_VALUE = _FOC_NULL;

DEFINE FILE CAR
DISPINNETCNTCM/I11 = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
DISPINNETCNTLM/I11 = IF COUNTRY EQ 'JAPAN' THEN RETAIL_COST ELSE 0;
DISPINNETCNT3M/I11 = IF COUNTRY EQ 'ITALY' THEN RETAIL_COST+10 ELSE 0;
END
TABLE FILE CAR
SUM

	COMPUTE CURRENT_MONTH/A20 = FTOA((DISPINNETCNTCM / SALES) * 100,'(D18.4)','A20');
	COMPUTE LAST_MONTH/A20    = FTOA((DISPINNETCNTLM / SALES) * 100,'(D18.4)','A20');
	COMPUTE PAST_VALUE/A20    = FTOA((DISPINNETCNT3M / SALES) * 100,'(D18.4)','A20');
-*
BY CAR 
-*
-*
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDSUMM
END
-RUN
-*
-READFILE  HOLDSUMM
-SET CURRENT_VALUE = &CURRENT_VALUE;
-SET LAST_VALUE = &LAST_VALUE;
-SET PAST_VALUE = &PAST_VALUE; 

This message has been edited. Last edited by: Don Garland,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Virtuoso
posted Hide Post
Could you try it with HOLD FORMAT ALPHA?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
quote:
HOLD FORMAT ALPHA?


That was my first thought, but it didn't change the outcome. I also thought that maybe those DEFINEd fields were not fully realized in the matrix for some reason, so I held the file than ran the computes, but still, no luck.

OUTPUT FROM ORIGINAL PROCEDURE
 -DEFAULTH &CURRENT_VALUE = _FOC_NULL;
 -DEFAULTH &LAST_VALUE = _FOC_NULL;
 -DEFAULTH &PAST_VALUE = _FOC_NULL;
 DEFINE FILE CAR
 DISPINNETCNTCM/I11 = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
 DISPINNETCNTLM/I11 = IF COUNTRY EQ 'JAPAN' THEN RETAIL_COST ELSE 0;
 DISPINNETCNT3M/I11 = IF COUNTRY EQ 'ITALY' THEN RETAIL_COST+10 ELSE 0;
 END
 TABLE FILE CAR
 SUM
 COMPUTE CURRENT_MONTH/A20 = FTOA((DISPINNETCNTCM / SALES) * 100,'(D18.4)','A20');
 COMPUTE LAST_MONTH/A20    = FTOA((DISPINNETCNTLM / SALES) * 100,'(D18.4)','A20');
 COMPUTE PAST_VALUE/A20    = FTOA((DISPINNETCNT3M / SALES) * 100,'(D18.4)','A20');
 -*
 BY CAR
 -*
 -*
 ON TABLE SET PAGE-NUM NOLEAD
 ON TABLE SET ASNAMES ON
 ON TABLE NOTOTAL
 ON TABLE HOLD AS HOLDSUMM FORMAT ALPHA
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=       18  LINES=     10
 (FOC2906)  WARNING: &PAST_VALUE WILL BE OVERWRITTEN BY -READFILE HOLDSUMM
 -READFILE  HOLDSUMM
 -SET CURRENT_VALUE = _FOC_NULL;
 -SET LAST_VALUE = _FOC_NULL;
 -SET PAST_VALUE =                64.88;

  



HOLD VERSION

 -SET &ECHO = ALL;

-DEFAULTH &CURRENT_VALUE = _FOC_NULL;
-DEFAULTH &LAST_VALUE = _FOC_NULL;
-DEFAULTH &PAST_VALUE = _FOC_NULL;

DEFINE FILE CAR
DISPINNETCNTCM/I11 = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
DISPINNETCNTLM/I11 = IF COUNTRY EQ 'JAPAN' THEN RETAIL_COST ELSE 0;
DISPINNETCNT3M/I11 = IF COUNTRY EQ 'ITALY' THEN RETAIL_COST+10 ELSE 0;
END
TABLE FILE CAR
SUM
SALES
DISPINNETCNTCM 
DISPINNETCNTLM 
DISPINNETCNT3M 
-*
BY CAR 
-*
-*
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDSUMM FORMAT ALPHA
END
-RUN
-*
TABLE FILE HOLDSUMM
SUM

	COMPUTE CURRENT_MONTH/A20 = FTOA((DISPINNETCNTCM / SALES) * 100,'(D18.4)','A20');
	COMPUTE LAST_MONTH/A20    = FTOA((DISPINNETCNTLM / SALES) * 100,'(D18.4)','A20');
	COMPUTE PAST_VALUE/A20    = FTOA((DISPINNETCNT3M / SALES) * 100,'(D18.4)','A20');
ON TABLE HOLD AS HOLDSUMM FORMAT ALPHA
END
-RUN
-*
-READFILE  HOLDSUMM
-SET CURRENT_VALUE = &CURRENT_VALUE;
-SET LAST_VALUE = &LAST_VALUE;
-SET PAST_VALUE = &PAST_VALUE; 


OUTPUT FROM THE HOLD VERSION
 -DEFAULTH &CURRENT_VALUE = _FOC_NULL;
 -DEFAULTH &LAST_VALUE = _FOC_NULL;
 -DEFAULTH &PAST_VALUE = _FOC_NULL;
 DEFINE FILE CAR
 DISPINNETCNTCM/I11 = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
 DISPINNETCNTLM/I11 = IF COUNTRY EQ 'JAPAN' THEN RETAIL_COST ELSE 0;
 DISPINNETCNT3M/I11 = IF COUNTRY EQ 'ITALY' THEN RETAIL_COST+10 ELSE 0;
 END
 TABLE FILE CAR
 SUM
 SALES
 DISPINNETCNTCM
 DISPINNETCNTLM
 DISPINNETCNT3M
 -*
 BY CAR
 -*
 -*
 ON TABLE SET PAGE-NUM NOLEAD
 ON TABLE SET ASNAMES ON
 ON TABLE NOTOTAL
 ON TABLE HOLD AS HOLDSUMM FORMAT ALPHA
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=       18  LINES=     10
 -*
 TABLE FILE HOLDSUMM
 SUM
 COMPUTE CURRENT_MONTH/A20 = FTOA((DISPINNETCNTCM / SALES) * 100,'(D18.4)','A20');
 COMPUTE LAST_MONTH/A20    = FTOA((DISPINNETCNTLM / SALES) * 100,'(D18.4)','A20');
 COMPUTE PAST_VALUE/A20    = FTOA((DISPINNETCNT3M / SALES) * 100,'(D18.4)','A20');
 ON TABLE HOLD AS HOLDSUMM FORMAT ALPHA
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=       10  LINES=      1
 -*
 (FOC2906)  WARNING: &PAST_VALUE WILL BE OVERWRITTEN BY -READFILE HOLDSUMM
 -READFILE  HOLDSUMM
 -SET CURRENT_VALUE = _FOC_NULL;
 -SET LAST_VALUE = _FOC_NULL;
 -SET PAST_VALUE =                24.52;
 


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Guru
posted Hide Post
ARRRGGGGG! The FIELDs don't match.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:
TABLE FILE CAR
SUM

COMPUTE CURRENT_MONTH/A20 = FTOA((DISPINNETCNTCM / SALES) * 100,'(D18.4)','A20');
COMPUTE LAST_MONTH/A20 = FTOA((DISPINNETCNTLM / SALES) * 100,'(D18.4)','A20');
COMPUTE PAST_VALUE/A20 = FTOA((DISPINNETCNT3M / SALES) * 100,'(D18.4)','A20');
-*
BY CAR
-*
-*
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDSUMM
END
-RUN
-*
-READFILE HOLDSUMM
-SET CURRENT_VALUE = &CURRENT_VALUE;
-SET LAST_VALUE = &LAST_VALUE;
-SET PAST_VALUE = &PAST_VALUE;


Two of the names in the RHS of the -SET commands (CURRENT_VALUE, LAST_VALUE) do not match those in your COMPUTEs,so they are unaffected by the READFILE.

Add a ?FF HOLDSUMM to display the columns of the hold file. All fields referenced in the COMPUTE formulas will be treated as implied NOPRINT verb objects, and will normally be included in the Hold layout.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:

(FOC2906) WARNING: &PAST_VALUE WILL BE OVERWRITTEN BY -READFILE HOLDSUMM


If you place you -DEFAULT statements after the -READFILE, you'll avoid those warnings.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Hmmm, Is that an 8.1 thing? I'm still getting them in 8009. Also, had to turn off prompting to user
-DEFAULT
.

-*WHERE &WFUSERNAME EQ &IBIMR_user;  &CANCEL_WFUSERNAME_FILTER
WHERE I_YEARMONTH_NUM EQ 201803;
WHERE CORPORATEORGID  EQ _FOC_NULL;
WHERE HOSPICEORGID    EQ _FOC_NULL;
WHERE BUSINESSMODEL   EQ '_FOC_NULL';
-*
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDSUMM
END
-RUN
0 NUMBER OF RECORDS IN TABLE=        1  LINES=      1
-*
(FOC2906)  WARNING: &I_YEARMONTH_NUM WILL BE OVERWRITTEN BY -READFILE HOLDSUMM
(FOC2906)  WARNING: &CURRENT_VALUE WILL BE OVERWRITTEN BY -READFILE HOLDSUMM
(FOC2906)  WARNING: &LAST_VALUE WILL BE OVERWRITTEN BY -READFILE HOLDSUMM
(FOC2906)  WARNING: &PAST_VALUE WILL BE OVERWRITTEN BY -READFILE HOLDSUMM
-READFILE  HOLDSUMM
-*
-DEFAULT &CURRENT_VALUE = _FOC_NULL
-DEFAULT &LAST_VALUE    = _FOC_NULL
-DEFAULT &PAST_VALUE    = _FOC_NULL
-*
-SET CURRENT_VALUE =                 9.45;
-SET LAST_VALUE =                71.32;
-SET PAST_VALUE =                61.36;
-*
-SET &CURRENT_VALUE =                 9.45|'%';
-SET &LAST_VALUE =                71.32|'%';
-SET &PAST_VALUE =                61.36|'%';  

This message has been edited. Last edited by: Don Garland,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 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     [SOLVED] Dash READFILE Doesn't read all variables

Copyright © 1996-2020 Information Builders