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.
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, RaghuThis message has been edited. Last edited by: Kerry,
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, 2010
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.
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, 2007
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, 2007