TABLE FILE FPADRO PRINT WRKDAYS DELD_CASE_CNT PAID_HRS WHERE so AND so AND so ON TABLE SAVE AS DAYS END -RUN
-READ DAYS &WKDAYS.I6. &DELCASE.I9. &PDHRS.P13.
this program ran well with server 7.1.6 but now it fails with server 7.6.7 with the following error message
0 ERROR AT OR NEAR LINE 31 IN PROCEDURE ROWAICL0FOCEXEC * (FOC299) UNRECOGNIZED FORMAT OF AMPER VARIABLE IN -READ: -READ DAYS &WKDAYS.I6. &DELCASE.I9. &PDHRS.P13.
thanks, EL from BaltimoreThis message has been edited. Last edited by: Kerry,
WebFOCUS 8.2.01 AppStudio HTML, PDF, Excel
August 19, 2009, 05:18 PM
GinnyJakes
Try doing ON TABLE HOLD FORMAT ALPHA instead. When you create the save file, can you post the formats it gives you for the fields? On your -READ, you might want to change the P13 to an A13.
SAVE always creates an ALPHA format file. If you want a binary save file you must use SAVB.
However the issue here is code tightening.
& variables are always alpha and should be read (in your case) as
-READ DAYS &WKDAYS.A6. &DELCASE.A9. &PDHRS.A13.
The fact that -READ worked wrongly in the past is unfortunate, and I know there are a lot of people out there who are going to have the same issue
August 20, 2009, 02:49 AM
GamP
To avoid any possible misunderstandings in any situation, I always use (and used) the -READ without any format indications, only lengths. My code would have read: -READ DAYS &WKDAYS.6. &DELCASE.9. &PDHRS.13. which is accepted in all previous releases of (Web)Focus, as well as the latetst one.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 20, 2009, 07:21 AM
Danny-SRL
You can also use the variable field length format of -READ:
DEFINE FILE FPADRO
COMMA/A1=',';
END
TABLE FILE FPADRO
PRINT WRKDAYS COMMA DELD_CASE_CNT COMMA PAID_HRS
WHERE so AND so AND so
ON TABLE SAVE AS DAYS
END
-RUN
-READ DAYS,&WKDAYS,&DELCASE,&PDHRS
Like that, if ever your MASTER is changed because the underlying DB2 table is changed, it will still work.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 20, 2009, 08:12 AM
jimster06
If I recall correctl;y, amper vars are strings, either character or integers. You may want to rethink how you handle the packed decimal field. HTH
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
August 21, 2009, 02:23 PM
Emily Lee
Thank you very much for good suggestions from many of you. We learn a lot.