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     Reading Packed Decimal from Hold File

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Reading Packed Decimal from Hold File
 Login/Join
 
Platinum Member
posted
What is the syntax to read fields from a hold file consisting of format P15.2?

I have code like this

DEFINE FILE XX
D_HLDBK_AMT /P15.2M = HDBK_AMT;
D_ADVNC /P15.2M = CLM_ADV_AMT;
END

TABLE FILE XX
SUM
D_HLDBK_AMT
D_ADVNC
WHERE STAT NE 'CN'
ON TABLE HOLD AS HTOTAL FORMAT FOCUS
END

-RUN

-READ &T_HLDBK_AMT.P15 &T_ADVNC.P15

-TYPE T_HLDBK_AMT (&T_HLDBK_AMT)
-TYPE T_ADVNC (&T_ADVNC)

I am getting the error
(FOC295) A VALUE IS MISSING FOR: T_HLDBK_AMT

I can't for the life of me figure out the correct syntax....do I need FORMAT FOCUS, or something else?

Should the -READ use format P15 or something else? Are other commas or decimals required in the -READ line??

Your assistance is appreciated!!

Thanks,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Virtuoso
posted Hide Post
When you hold as format focus or most any thing else you can just use a TABLE FILE against the hold as name.

To be honest, I've never used the -read command.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
I don't know if holding as ALPHA is an option but you can give this a try:

DEFINE FILE CAR
TEST/P15.2 = DEALER_COST;
END
-RUN
TABLE FILE CAR
SUM
     DEALER_COST
     TEST
ON TABLE HOLD AS H0 FORMAT ALPHA
END
-RUN
? HOLD H0
-RUN
-READ H0 &COST.D7 &TEST.P15.2
-RUN
-TYPE COST: &COST
-TYPE TEST: &TEST
-RUN
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<JG>
posted
You can not -READ a format FOCUS file as they are binary.

Change to code to use SAVE AS HTOTAL and it will work

DEFINE FILE XX
D_HLDBK_AMT /P15.2M = HDBK_AMT;
D_ADVNC /P15.2M = CLM_ADV_AMT;
END

TABLE FILE XX
SUM
D_HLDBK_AMT
D_ADVNC
WHERE STAT NE 'CN'
ON TABLE SAVE AS HTOTAL
END

-RUN

-READ &T_HLDBK_AMT.A15. &T_ADVNC.A15.

-TYPE T_HLDBK_AMT (&T_HLDBK_AMT)
-TYPE T_ADVNC (&T_ADVNC)
 
Report This Post
Platinum Member
posted Hide Post
JG, thanks a bunch!! That worked great! It has always been a mystery to me.

Thanks reFOCUSing and Leah for your help also!

Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 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     Reading Packed Decimal from Hold File

Copyright © 1996-2020 Information Builders