I am trying to create variables using a 1 record HOLD file.
I get the following error:
0 ERROR AT OR NEAR LINE 42 IN PROCEDURE invoice_detail_subsidiary_daily (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: COMPHOLD 0 ERROR AT OR NEAR LINE 43 IN PROCEDURE invoice_detail_sub (FOC2907) ERROR WITH DIALOGUE MANAGER COMMAND: -READFILE COMPHOLD
Code that I am trying to run:
TABLE FILE COMPANY_LOCATION PRINT FFA_DAY_END FFA_FISCAL_WEEK FFA_FISCAL_PERIOD FFA_FISCAL_YEAR ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE HOLD AS COMPHOLD ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=REPORT, GRAPHCOLOR='GREEN', $ TYPE=REPORT, OBJECT=MENU, COLOR='WHITE', HOVER-COLOR=RGB(66 70 73), BACKCOLOR=RGB(102 102 102), HOVER-BACKCOLOR=RGB(218 225 232), BORDER-COLOR='WHITE', $ TYPE=REPORT, OBJECT=STATUS-AREA, COLOR='WHITE', BACKCOLOR=RGB(102 102 102), $ TYPE=REPORT, OBJECT=CURRENT-ROW, HOVER-BACKCOLOR=RGB(218 225 232), BACKCOLOR=RGB(200 200 200), $ TYPE=REPORT, OBJECT=CALC-AREA, COLOR='WHITE', BACKCOLOR=RGB(102 102 102), $ ENDSTYLE END -READFILE COMPHOLD -TYPE FFA_DAY_END IS &DE -TYPE FFA_FISCAL_WEEK IS &FW -TYPE FFA_FISCAL_PERIOD IS &FP -TYPE FFA_FISCAL_YEAR IS &FYThis message has been edited. Last edited by: Kerry,
WebFocus 8.1.5 iSeries/Windows DB2/SQL/Access Dev Studio App Studio Maintain ReportCaster
February 09, 2012, 02:12 PM
Dan Satchell
You need a -RUN after the END statement and before the -READFILE.
WebFOCUS 7.7.05
February 09, 2012, 02:16 PM
njsden
In addition to Dan's comment, you will probably need to:
...
ON TABLE HOLD AS COMPHOLD FORMAT ALPHA
...
Otherwise you'll get a binary representation of the values, something Dialogue Manager (and you) may not be too happy about.
That is, of course, assuming your FFA_* fields are numeric. If they are all strings in your source data then you shouldn't have any issues by leaving the HOLD file as binary.
format is typically Ann, where nnis the length of the string to get.
If you issue a ? HOLD COMPHOLD you will see the lengths of the fields.
Unless you are going to use the file COMPHOLD later in your fex, I would suggest using ON TABLE SAVE AS COMPHOLD, as this creates an alpha version of the file anyway, and also shows the field sizes in the output making it easier to work out the -READ.
There are may examples of this in the forum.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
February 09, 2012, 03:08 PM
njsden
Waz, Jay is using WF 7.7.x and the cool -READFILE feature added to it.
It makes -READing from HOLD files into &variables a walk in the park (provided there is a master file associated with it, of course).
jay, get rid of all that stylesheet noise..it has no part of this task. I would have issued a -READ filename varname.size i can't wait to upgrade and find out about this walk in the park -READFILE... tks new jersey!
quote:
TABLE FILE COMPANY_LOCATION PRINT FFA_DAY_END FFA_FISCAL_WEEK FFA_FISCAL_PERIOD FFA_FISCAL_YEAR ON TABLE HOLD AS COMPHOLD FORMAT ALPHA END -RUN
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 10, 2012, 07:11 AM
Jay Potter
Thank You for all the comments. It helped me go in the right direction.
WebFocus 8.1.5 iSeries/Windows DB2/SQL/Access Dev Studio App Studio Maintain ReportCaster
February 10, 2012, 07:19 AM
Jay Potter
I did take the noise out.It was one of those things that Dev Studio like to add,
Thanks again
WebFocus 8.1.5 iSeries/Windows DB2/SQL/Access Dev Studio App Studio Maintain ReportCaster
February 10, 2012, 09:19 AM
j.gross
quote:
-READFILE COMPHOLD -TYPE FFA_DAY_END IS &DE
READFILE -- nifty as it is -- is not a mind-reader. The value of FFA_DAY_END will be placed in &FFA_DAY_END
- Jack Gross WF through 8.1.05
February 10, 2012, 11:41 AM
George Patton
Right on Susannah ! Styling should be saved for final output IMHO.
I've found the GUI tools in 7.7.03M doing a more decent job than in previous versions (particularly the Synonym Editor and the JOIN /MATCH Tool) so I'm seeing myself using the GUI to scaffold my reports more frequently than in the past.
Dev Studio's Report Painter could do a better job at *not* adding any STYLE statements (which susannah accurately calls "noise") when choosing a non-styled output format such as HOLD BINARY, HOLD ALPHA, HOLD FOCUS, etc.
TABLE FILE EMPLOYEE
PRINT LAST_NAME FIRST_NAME DEPARTMENT CURR_SAL
BY EMP_ID
ON TABLE HOLD AS READF1 FORMAT BINARY
END
-RUN
-READFILE READF1
-TYPE LAST_NAME IS &LAST_NAME
-TYPE FIRST_NAME IS &FIRST_NAME
-TYPE DEPARTMENT IS &DEPARTMENT
-TYPE CURR_SAL IS &CURR_SAL
-TYPE EMP_ID IS &EMP_ID
They used BINARY.
February 10, 2012, 12:51 PM
susannah
"scaffold"...perfect word!
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 10, 2012, 03:20 PM
njsden
quote:
They used BINARY.
Wow! I hadn't figured that out so our old trick of HOLDing ALPHA is no longer a must when reading values into &variables. -READFILE really was a nice addition to Dialogue Manager!