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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Creating a variable using a HOLD file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Creating a variable using a HOLD file
 Login/Join
 
Guru
posted
I am a Newbie. Confused

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 &FY

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


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Virtuoso
posted Hide Post
You need a -RUN after the END statement and before the -READFILE.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
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.



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
Also to read from a file you need to:

-READ COMPHOLD &Var1.{format}. &Var1.{format}. etc  


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.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
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).



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
Can't wait to upgrade.....

Big Grin


Been trying for a couple of years....

Frowner


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!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
I know the feeling ... I just moved to 7.7.03 in July last year, after about 4 years working with 5.3.4 Eeker

Actually, I'm not being fair. 5.3.4 was a very decent version and we managed to do interesting things with it at my last place.

Anyway, hope you'll be able to make an upgrade before WF 8.x Wink



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
We're moving to 7.6.11, and then probably 8, but when you look at how long its takes so far, it may be 9


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!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
... it may be 9





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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
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
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Guru
posted Hide Post
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
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Right on Susannah ! Styling should be saved for final output IMHO.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
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.



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
I found this in the online help for 7.7.03:

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.
 
Posts: 60 | Location: Ellensburg Washington | Registered: May 22, 2009Report This Post
Expert
posted Hide Post
"scaffold"...perfect word!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
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!



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.
 
Posts: 1533 | Registered: August 12, 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] Creating a variable using a HOLD file

Copyright © 1996-2020 Information Builders