Focal Point
[SOLVED]Error message after doing a -READ

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4397030636

December 11, 2013, 02:31 PM
Michele Brooks
[SOLVED]Error message after doing a -READ
I am running a program that has about 16 -READs in it. I am in the testing process so I'm constantly running the report over and over again to test the modifications that I made. Every so often it bombs out on the first record and I get the same error message each time it bombs out that I pasted below. When I get that message, I just run the program again and it runs ok. I also pasted the filedef I have defined. Thanks.

 

-SET &HLDMRS3   = &FOCCPU || '_' || 'p320b';
-SET &HLDFILE3  = &HLDMRS3 || '.ftm';
-SET &HLDMAS3   = &HLDMRS3 || '.mas';


AFTER MATCH HOLD AS 60_p320b       OLD-OR-NEW
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=       56  LINES=      6
 0 NUMBER OF RECORDS IN TABLE=       56  LINES=      6
 0 NUMBER OF RECORDS SELECTED=        6  LINES=      6
 0 NUMBER OF RECORDS SELECTED=        6  LINES=      6
 0 LINES OF MATCH OUTPUT     =       12
 0 ERROR AT OR NEAR LINE    626  IN PROCEDURE ddc_std_summary_ov
 (FOC36219)  AN ERROR OCCURED WHEN OPENING FILE: 60_p320b
 

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
December 11, 2013, 03:11 PM
Waz
May I ask why you are using &FOCCPU ?

This variable should contain the cpu time this session has accumulated.

I assume you only create HLDMRS3 once ?

Also, are you reading the results of a MATCH ?, the datesa and numbers will be stored as binary not alpha.

What are the format of the fields being written to the file ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 11, 2013, 03:33 PM
susannah
like Waz says,
you gotta stick a FORMAT ALPHA in the HOLD statement in order to -READ anything from it.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 17, 2013, 09:59 AM
Michele Brooks
I am doing an ON TABLE HOLD FORMAT ALPHA. See code pasted below. I am setting up the hold files according the production setup that was established before I started my temporary assignment with this compnay. Hold files use the &FOCCPU variable in their hold file names. My apologies for not getting back to this sooner.


TABLE FILE &HLDMRS3
SUM ID 
BY ID_NAME
WHERE ID_NAME NE ''
ON TABLE HOLD AS &HLDMRS4 FORMAT ALPHA
END
TABLE FILE &HLDMRS4
LIST ID ID_NAME
ON TABLE SAVE AS &HLDMRS5
END
-RUN
-TYPE &LINES


-READ &HLDMRS5 &RECORD_COUNT1.I5. &ID_DATA.A71.
-CLOSE &HLDMRS5
-SET &REC_CNT1 = EDIT(&RECORD_COUNT1,'$$$$9');
-SET &ID1   = EDIT(&ID_DATA,'$$$$$$999999999');
-SET &ID_NAME1 = EDIT(&ID_DATA,'$$$$$$$$$$$$$$$$$$$$$99999999999999999999999999999999999');
-TYPE &RECORD_COUNT1
-TYPE &ID1
-TYPE &ID_NAME1

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
December 17, 2013, 01:06 PM
njsden
quote:
I am doing an ON TABLE HOLD FORMAT ALPHA.


You are doing that when creating &HLDMRS4, but not on the creation of &HLDMRS3 which seems to be the one failing.

quote:

-SET &HLDMRS3   = &FOCCPU || '_' || 'p320b';
AFTER MATCH HOLD AS 60_p320b       OLD-OR-NEW
 END
 -RUN
...
 0 ERROR AT OR NEAR LINE    626  IN PROCEDURE ddc_std_summary_ov
 (FOC36219)  AN ERROR OCCURED WHEN OPENING FILE: 60_p320b



That "AFTER MATCH HOLD" is still creating a binary file.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
December 17, 2013, 01:31 PM
Michele Brooks
What would I have to do in order to do a clean -READ without that error message popping up?


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
December 17, 2013, 06:13 PM
j.gross
1. With &ECHO=ALL, you might be able to narrow down what line of code is throwing the error.

2. In general, I don't use ddnames that start with a numeric.
December 18, 2013, 05:04 AM
Twanette
Hi Michele,

Do you do a -READ directly off you "&HLDMRS3" file? i.e.
-READ &HLDMRS3 ...
If you don't then it is very possible that the issue isn't with your -READs.

You said:
quote:
I also pasted the filedef I have defined.

I don't see it. Please paste it again. It may be the culprit.

And then to echo what @j.gross said - put a
-SET &ECHO=ALL;
right at the top of the procedure, and put -RUN after any JOINs and after each END statement.
That way you can force the execution of each step and possibly have better luck locating the real culprit!


WebFOCUS 8.2.06 mostly Windows Server
December 18, 2013, 03:42 PM
Michele Brooks
I will try when I get a chance. I'll have to keep running it until I receive the error message. It happens sporatically. Thanks for the feedback. Will keep you posted.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
January 02, 2014, 09:54 AM
Michele Brooks
I found out what was causing the -READ error. The BY fields in the first record of the HOLD files were blank. I replaced the blank with dummy data and ran the report several times. I ran the report successfully and did not get a -READ error. I will mark this post [SOLVED]. Thanks to all who provided feedback.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output