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     [SOLVED] How to read packDecimal value from a SAVE file on mainframe

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to read packDecimal value from a SAVE file on mainframe
 Login/Join
 
Gold member
posted
I like to know how to READ the PackDecimal value from a SAVE file with server 7.6.7 on Mainframe. The code works for 7.1.4 fails on 7.6.7

I need to read three data value from a query result.
DB2 table is defined as

FIELD=WRKDAYS ,WRKDAYS ,I6 ,I2 ,MISSING=OFF,
FIELD=PAID_HRS ,PAID_HRS ,P13.2 ,P6 ,MISSING=OFF,
FIELD=DELD_CASE_CNT ,DELD_CASE_CNT ,I9 ,I4 ,MISSING=OFF,


My Program is

TABLE FILE FPADRO
PRINT WRKDAYS DELD_CASE_CNT PAID_HRS
WHERE so AND so AND so
ON TABLE SAVE AS DAYS
END
-RUN

-READ DAYS &WKDAYS.I6. &DELCASE.I9. &PDHRS.P13.

this program ran well with server 7.1.6 but now it fails with server 7.6.7 with the following error message


0 ERROR AT OR NEAR LINE 31 IN PROCEDURE ROWAICL0FOCEXEC *
(FOC299) UNRECOGNIZED FORMAT OF AMPER VARIABLE IN -READ: -READ DAYS &WKDAYS.I6.
&DELCASE.I9. &PDHRS.P13.

thanks,
EL from Baltimore

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


WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
 
Posts: 61 | Registered: March 12, 2008Report This Post
Expert
posted Hide Post
Try doing ON TABLE HOLD FORMAT ALPHA instead. When you create the save file, can you post the formats it gives you for the fields? On your -READ, you might want to change the P13 to an A13.


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
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
<JG>
posted
SAVE always creates an ALPHA format file.
If you want a binary save file you must use SAVB.

However the issue here is code tightening.

& variables are always alpha and should be read (in your case) as

-READ DAYS &WKDAYS.A6. &DELCASE.A9. &PDHRS.A13.

The fact that -READ worked wrongly in the past is unfortunate,
and I know there are a lot of people out there who are going to have the same issue
 
Report This Post
Virtuoso
posted Hide Post
To avoid any possible misunderstandings in any situation, I always use (and used) the -READ without any format indications, only lengths. My code would have read:
-READ DAYS &WKDAYS.6. &DELCASE.9. &PDHRS.13.
which is accepted in all previous releases of (Web)Focus, as well as the latetst one.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
You can also use the variable field length format of -READ:
  
DEFINE FILE FPADRO
COMMA/A1=',';
END
TABLE FILE FPADRO
PRINT WRKDAYS COMMA DELD_CASE_CNT COMMA PAID_HRS
WHERE so AND so AND so 
ON TABLE SAVE AS DAYS
END
-RUN

-READ DAYS,&WKDAYS,&DELCASE,&PDHRS

Like that, if ever your MASTER is changed because the underlying DB2 table is changed, it will still work.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Guru
posted Hide Post
If I recall correctl;y, amper vars are strings, either character or integers. You may want to rethink how you handle the packed decimal field.
HTH


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Gold member
posted Hide Post
Thank you very much for good suggestions from many of you. We learn a lot.

Emily


WebFOCUS 8.2.01 AppStudio
HTML, PDF, Excel
 
Posts: 61 | Registered: March 12, 2008Report 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] How to read packDecimal value from a SAVE file on mainframe

Copyright © 1996-2020 Information Builders