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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] facing problem while Reading column from a hold file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] facing problem while Reading column from a hold file
 Login/Join
 
Gold member
posted
Hi All,
we need to read column from the hold file and assign it to varaible .
I am trying as below but i am getting error.((FOC299) UNRECOGNIZED FORMAT OF AMPER VARIABLE IN -READ: -READ EXAMPLE)

TABLE FILE COMPARE_SAVINGS_FINAL
PRINT CURR_YR_OP_AMT
-*?FF
ON TABLE HOLD AS EXAMPLE FORMAT TAB
END

-RUN
-READ EXAMPLE &EXAMPLE.D20.2. NOCLOSE
-TYPE &EXAMPLE
Please let me know where i am getting wrong?

Thanks in advance,
Raghu

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


WebFOCUS 7.6.7
Windows
Excel, PDF, HTML
 
Posts: 56 | Registered: February 04, 2010Report This Post
Master
posted Hide Post
Raghu,

It's look okay to me...

only thing I'm sure about is the Format
in
-READ EXAMPLE &EXAMPLE.D20.2. NOCLOSE


From the help-files:
Is the format of the variable. For a free-format file, specifying this value is optional. For a fixed-format file, format is the length or the type and the length. The type is either A (alphanumeric), which is the default, or I (numeric). The format value must be delimited by periods. The format is ignored for comma-delimited files.

So only A and I are allowed... not D

Funny thing is we have a working procedure with this code:
-READ HOLD &CN2.A50


No period after the format.


hope it helps...
good luck
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Platinum Member
posted Hide Post
TRY,

TABLE FILE COMPARE_SAVINGS_FINAL
PRINT CURR_YR_OP_AMT
ON TABLE SAVE AS EXAMPLE
END
-RUN

-READ EXAMPLE &EXAMPLE.A20.
-TYPE &EXAMPLE


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Gold member
posted Hide Post
Hi Cyril,
Thanks for you reply
It is working for (.A20) but it is not working for D20.2.
We are using this variable for union 2 records if i use the varible,There we are facing problems because of the field format.

Thanks,
Raghu


WebFOCUS 7.6.7
Windows
Excel, PDF, HTML
 
Posts: 56 | Registered: February 04, 2010Report This Post
Virtuoso
posted Hide Post
As Dave said, only 'A' and 'I' formats are supported for -READ. In fact, there is no need to specify even the 'A' or 'I' because WebFOCUS will make its own determination as to whether the value is numeric or not when you try to use it. The period after the format is also not necessary.

In the example below, SALARY has a format of D12.2M in file EMPDATA. The value written to the SAVE file has a length of 12, including the decimals and decimal point. But a problem may occur when you try to use variable &SALARY in a calculation. If you do not set DMPRECISION, Dialogue Manager will perform the calculation and return only the integer portion of the result (decimals are truncated). You must set DMPRECISION in order to retain decimals in Dialogue Manager calculations.

TABLE FILE EMPDATA
 PRINT SALARY
 WHERE RECORDLIMIT EQ 1 ;
 ON TABLE SAVE
END
-*
-RUN
-READ SAVE &SALARY.12
-TYPE &SALARY
-*
SET DMPRECISION = 2
-RUN
-SET &TESTVAL = &SALARY / 2000 ;
-TYPE &TESTVAL


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Hi Dan,
I am trying as below for format (I) I am getting the error.

TABLE FILE COMPARE_SAVINGS_FINAL
PRINT CURR_YR_OP_AMT
-*?FF
ON TABLE HOLD AS EXAMPLE FORMAT TAB
END

-RUN
-READ EXAMPLE &EXAMPLE.I20
-TYPE EXAMPLE = &EXAMPLE

Thanks,
Raghu


WebFOCUS 7.6.7
Windows
Excel, PDF, HTML
 
Posts: 56 | Registered: February 04, 2010Report This Post
Guru
posted Hide Post
I am trying to figure out
1) why you are using HOLD instead of SAVE.
2) why you are using format TAB?


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
It will not work with an I because you are not reading an integer - it is a decimal. Try following Dan's example (just specify a length or even an A12 would work.) The DMPRECISION setting is what will allow it to be used as a floating decimal.
I would also suggest skipping the TAB format. ON TABLE HOLD FORMAT ALPHA or ON TABLE SAVE will get you what you need.


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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Master
posted Hide Post
Raghu,
One more reason for the error. "I"-integer can hold a maximum of 11 digits. When you say error in the code, please post the error message too.

TABLE FILE CAR
SUM
DEALER_COST
ON TABLE HOLD AS TAB123 FORMAT TAB
END
-RUN

?FF TAB123
-READ TAB123 &DCOST.I11.
-TYPE &DCOST



Hope this helps.
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report 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     [CLOSED] facing problem while Reading column from a hold file

Copyright © 1996-2020 Information Builders