Focal Point
[SOLVED] SAVE File using filedef

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

December 16, 2008, 11:29 AM
IMblessed
[SOLVED] SAVE File using filedef
I have an error running a focexec in ReportCaster MRE . The error states that the save file does not exist or can not be found. There is a filedef statement before the on table save as saveit. As we know on save file webfocus does not create a master. Does a master file description need to be create before this code is run. We have another focexec which is similar and it runs fine. There is no master file description as well. I'm using webfocus 7.6.4 under unix.

This message has been edited. Last edited by: Kerry,


EDA764 Release * Current Software:
Unix
December 16, 2008, 11:37 AM
GinnyJakes
Can you post your code between the code tags please?

Are you trying to TABLE the SAVE file or merely read it with a -READ?

Was the file saved previously to the execution of the fex in question?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
December 16, 2008, 11:53 AM
IMblessed
I'm sorry about this. The problem is in Reportcaster. I'm attempting to schedule this report to run in Reportcaster, passing 3 parameters just like the one that is already in production and running fine. The error about saveit not found is due to if the client we select in one of the parameter has no data for it, that error will come up. But once I know that the client has data and should run correctly the saveit message will appear. It looks like the passing of the parameters is the problem.


EDA764 Release * Current Software:
Unix
December 16, 2008, 01:14 PM
Darin Lee
If the client you select has no data then it cannot create a save file and you will get that error. (it won't create an empty file.) Maybe you need to check the &LINES or &RECORDS system variable to see if any data exists before producing the save file.


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
December 16, 2008, 02:33 PM
IMblessed
Once I'm in ReportCaster ,open the task, click on the advance tab to select the procedure I want, then attempt to run it I receive the error Pocedure cannot be found. I'm attempting to schedule this procedure to run.


EDA764 Release * Current Software:
Unix
December 16, 2008, 03:09 PM
IMblessed
Webfocus Reporting Server procedure cannot be found. This is the error message I received.


EDA764 Release * Current Software:
Unix
December 16, 2008, 03:48 PM
GinnyJakes
I am getting very confused. You said this focexec was in MRE in your first post. You'll have to select 'Standard Report' or 'My Report' to get your focexec not reporting server procedure. Please clarify.

And please, before you post anymore, update your profile signature with your products, releases, and platforms.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
December 17, 2008, 10:18 AM
IMblessed
These focexecs is a new reports and my attempt to move these tasks into reportcaster the error appears.


EDA764 Release * Current Software:
Unix
December 17, 2008, 10:36 AM
IMblessed
These focexecs are new reports and my attempt to move these tasks into reportcaster is where the error appears.


EDA764 Release * Current Software:
Unix
December 17, 2008, 10:39 AM
GinnyJakes
Are they in MRE or Data Servers?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
December 17, 2008, 10:42 AM
Tony A
I think you've got ECHO on Wink lol

Ginny, seems you've picked a real corker to answer this time!! lol

T
December 17, 2008, 11:29 AM
GinnyJakes
I'm trying! Roll Eyes

quote:
click on the advance tab to select the procedure I want


OK, let's try again. You only click the Advanced tab if you want to set up parameters or pre- and/or post-processing procedures.

To select the program to run that actually does the report preparation for distribution, you click on the little folder with green arrow icon next to the input box which is next to 'Procedure Name:' which is right above the Advanced button.

Based on that description, please tell me what parts of that you are or are not doing so I can figure out what is going on. I haven't even gotten to the pathing part yet.

And can you paste the entire log message you are getting when you run this schedule? To do that, right-click on the schedule, select log, and run the last executed. It might shed some light on what is going on.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
December 17, 2008, 11:34 AM
IMblessed
I login to ReportCaster. Use Edit Schedule in reportcaster then New Task. In procedure Name I click on th icon on the right and select the report. I then click the advanced icon and then I recieved the error.


EDA764 Release * Current Software:
Unix
December 17, 2008, 11:51 AM
IMblessed
Ginny what you are saying is correct. Once I click the advanced icon the error come up so I'm not able to enter the parameters .


EDA764 Release * Current Software:
Unix
December 17, 2008, 02:51 PM
GinnyJakes
Since I can't see what you are doing, I recommend that you open a case with IBI. They will be able to log onto your machine and watch what you do that precipitates the error. Some of the problem may be environmental and it is impossible for me to figure that out from here.

I'm sorry that I couldn't be of more help.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
December 18, 2008, 08:16 AM
IMblessed
The code in the fex is similar to the example below. The only differents is the -Filedef statement does not have the path or .fex after Saveit. It also has a -Include statement for Saveit. I have one fex in production that work but the other 2 that I'm attempting to add does not in development or production.


Symptom/Problem/Solution
TECHNIQUE
How to create a graph sorted by largest amount
Case: 12672001 Product: Developer Studio Release: 5.3.4 8 Primary OS: Windows Date: 05/09/28
Case information refers to the Product, Release, and OS for which this question was asked. The solution may apply to other Products, Releases, and Operating Systems.
Problem:
The bars in the graph need to be sorted in order of the largest amount and
not alphabetically. In addition, the bars for the 5 highest values are to be
displayed, and all other values are to be summed into a category of 'OTHER'.
Solution:
The method will require several HOLD files. Ensure that you rename the
location in the FILEDEF and the APP HOLD commands.

FILEDEF SAVEIT DISK C:\IBI\APPS\12672001\SAVEIT.FEX
APP HOLD 12672001
-*
TABLE FILE GGSALES
SUM UNITS NOPRINT
BY HIGHEST TOTAL UNITS
BY PRODUCT
ON TABLE HOLD AS SALES1
END
-RUN
TABLE FILE SALES1
LIST UNITS PRODUCT
ON TABLE HOLD AS SALES2
END
-************
SET HOLDLIST = PRINTONLY
-RUN
DEFINE FILE SALES2
THECNT/A25=IF E01 LE 5 THEN PRODUCT ELSE 'Other';
NEWPRD/A30 = ''''||THECNT||'''' ;
END
TABLE FILE SALES2
SUM
E01 AS 'TLIST' UNITS PRODUCT
BY NEWPRD
ON TABLE HOLD AS SALES3
END
-***********
TABLE FILE SALES3
SUM
NEWPRD NOPRINT
COMPUTE VALS/A35 = IF LAST NEWPRD EQ ' ' THEN
NEWPRD ELSE 'AND ' | NEWPRD;
BY E00 NOPRINT
ON TABLE SAVE AS SAVEIT
END
-***********
GRAPH FILE SALES3
SUM UNITS
ACROSS PRODUCT COLUMNS
-INCLUDE SAVEIT
END
Product: Developer Studio, DEVSTUDIO
Symptom: None Assigned
Functional Area: None Assigned
Operating System: Windows, WIN/2K
Keywords: 12672001, HIGHEST, GROUP, GRAPH, ACROSS
Docid: 12672001


EDA764 Release * Current Software:
Unix
December 18, 2008, 08:24 AM
<JG>
quote:
-Include


The problem is that ReportRaster can not resolve the code for the -INCLUDE becasue it does not exist.

So you get the error when pressing the advanced tab because it must parse the code to see
if it must prompt you for any variables.

Try commenting out the -INCLUDE, schedule it and then uncomment the -INCLUDE.
December 18, 2008, 08:49 AM
PBrightwell
quote:
There is a filedef statement before the on table save as saveit

If this is true, it will put a FILEDEF in the middle of your graph process.

quote:

TABLE FILE SALES3
SUM
NEWPRD NOPRINT
COMPUTE VALS/A35 = IF LAST NEWPRD EQ ' ' THEN
NEWPRD ELSE 'AND ' | NEWPRD;
BY E00 NOPRINT
ON TABLE SAVE AS SAVEIT
END
-***********
GRAPH FILE SALES3
SUM UNITS
ACROSS PRODUCT COLUMNS
-INCLUDE SAVEIT
END

If you are wanting your products to be the products in SAVEIT, try IF NEWPRD EQ (SAVEIT). You might need to check that syntax.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
December 18, 2008, 02:21 PM
IMblessed
I just want to thank you guys for all your help. I create a fex call saveit, It was blank but the reports now worked in development. Move the fex to production. Now the user is adding the new task to production.


EDA764 Release * Current Software:
Unix
December 18, 2008, 03:50 PM
j.gross
quote:
TABLE FILE SALES3
SUM
. . .
ON TABLE SAVE AS SAVEIT
END
-***********
GRAPH FILE SALES3
SUM UNITS
ACROSS PRODUCT COLUMNS
-INCLUDE SAVEIT
END


In order to generate SAVEIT dynamically and then include it as code in a subsequent request, there must be a
-RUN
in between, to let the Table request run and populate the SAVEIT file with the "columns" data.

Without the -RUN, WF scans the Table and Graph requests as a unit before allowing either one to execute, and tries to expand the
-INCLUDE SAVEIT
statement before the file exists. Depending on platform, WF will get either a file-not-found condition or an immediate end-of-file as it tries to read from SAVEIT -- so WF will issue either a 'file not found' error, or a syntax error for the truncated COLUMNS phrase.


- Jack Gross
WF through 8.1.05