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] Request for new HOLD format AMPER

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Request for new HOLD format AMPER
 Login/Join
 
Member
posted
A couple ideas for new HOLD formats came up during one of the many 'hallway' meetings that always occur at Summit this year. The AMPER idea is for something like this:

TABLE FILE DATA
PRINT or SUM SOMETHING
WHERE ONLY_ONE_RECORD_RETURNED
ON TABLE HOLD INTO &ERVAR
END

We normally use -READ to get database values into amper variables all the time but it takes extra coding, i.e.:

TABLE FILE DATA
PRINT or SUM SOMETHING
WHERE ONLY_ONE_RECORD_RETURNED
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-READ HOLD &ERVAR.An.

In most cases this is the preferred method since it's the most flexible in terms of multiple variables and multiple records that can be processed by Dialog Manager looping. But in the case where only one value is needed, the HOLD INTO &ERVAR would be much quicker and provide an easier to understand source code.

This message has been edited. Last edited by: Kerry,
 
Posts: 14 | Location: Texas | Registered: May 16, 2006Report This Post
Expert
posted Hide Post
Another good idea, these "hallway" meetings sound interesting.


An interesting extension to this would be :

TABLE FILE DATA
PRINT or SUM FieldA B
ON TABLE HOLD INTO &Var_
END

and the result would be:

&Var_FieldA001
&Var_FieldA002
&Var_FieldA00n
&Var_FieldB001
&Var_FieldB002
&Var_FieldB00n

Although this could be quite dangerous, I think it could also be quite useful.

The only other way to do this is with -READ loop or the following:

TABLE FILE CAR
PRINT 
COMPUTE CNTR/I3 = LAST CNTR + 1 ; NOPRINT
COMPUTE SETVAR/A36 = '-SET &|CTY' || FTOA(CNTR,'(F3L)','A3') || '=''' || COUNTRY || ''';' ;
BY COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS FEX_CODE
END
-RUN
-INCLUDE FEX_CODE
-? &CTY


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<JG>
posted
SNF 7.7

-READFILE

quote:
Reading Master File Fields Into Dialogue Manager Variables
 
Report This Post
Member
posted Hide Post
-READFILE looks very useful in the same way 'FIXFORM FROM HOLDFILE' saves typing, and insulates changes in the hold file from failing the procedure. I can't remember how many times I added a field in a hold file because of a change in one part of the FEX and didn't update a FIXFORM or -READ that depended on an exact sequence of named columns (until I noticed my updated data had shifted into the wrong columns, i.e., NAME '1991Steve ', ADDRESS 'Smith421 Bel', CITY 'twayWashington', etc.).

But, HOLD INTO for one value should still process faster and provide cleaner code that's easier to understand. I think it would be an excellent addition.

This message has been edited. Last edited by: Steve F,
 
Posts: 14 | Location: Texas | Registered: May 16, 2006Report This Post
Expert
posted Hide Post
Looks like -READFILE is exactly what you wanted to ask for. Just one extra line.


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] Request for new HOLD format AMPER

Copyright © 1996-2020 Information Builders