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     MODIFY for retrieval only

Read-Only Read-Only Topic
Go
Search
Notify
Tools
MODIFY for retrieval only
 Login/Join
 
Member
posted
Many years ago, IBI's advanced modify course materials had examples of code using MODIFY for retrieval only. Can anyone find this and send it to me or tell me where to find it online?
 
Posts: 7 | Registered: May 25, 2006Report This Post
Master
posted Hide Post
Hi Bruce,

If you want to use the MODIFY command, but not to update a FOCUS db, you will want to be sure to use the USE command with the READ parameter. This will protect your db, from an inadvertent update.

Beyond this, one of the major ways to get output from a MODIFY command, besides INCLUDE, UPDATE, or DELETE, would be to use the 'TYPE ON ddname' command.

With 'TYPE ON ddname' you'd be creating a flat file, via the MODIFY command.

Is this the type (no pun intended) of thing you are looking to do?

Regards,
Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Gold member
posted Hide Post
Bruce:

From what I can recall, MODIFY for retrieval worked well with well designed FOCUS hierarchies or relations. The TYPE command can be used to outptut desired data into a sequential file.

With the MATCH key1. .. ON MATCH GOTO CASE1 - NEXT field ON NEXT FIELD IF D.field .. - or ON NEXT COMPUTE - worked nice to evaluate, retrieve and compute new values. Usually, conditions in a lower level segment could be evaluated in a NEXTing sequence to set summaries or switches to control other aggreagation/selection from other higher (or lower) level segments.

File inversion worked nice as well as long as the key field(s) were indexed (you could NEXT thru a lower level chain and make decisions on what to do with the higher level instances). I can recall a method where use of a COMBINE FILE structure to retrieve from one database while doing INCLUDEs to a single relation containing summary data worked well.

It depends on the application and what you are trying to solve. I have found that using pre-defined access paths with file inversions and multiple HOLD files using a combination of TABLEF and TABLE usually gets me the results I want. From there, I can summarize more, HOLD as a FOCUS file, do JOINs etc.
Jim


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
 
Posts: 77 | Location: Baltimore | Registered: May 31, 2006Report This Post
Expert
posted Hide Post
Hi Bruce,

Has this issue been resolved? Thanks to David and Jim's input. Smiler

Please try the code:

COMBINE EMPDATA AND LOCATOR PREFIX L_ AS EMPLOC
MODIFY FILE EMPLOC                             
PROMPT PIN.ENTER A PIN NUMBER.                 
  COMPUTE L_PIN=PIN;                           
                                               
   PERFORM GETNAME                             
   PERFORM GETLOCATION                         
   PERFORM TYPEMEOUT 
                          
CASE GETNAME              
 MATCH PIN                
   ON NOMATCH REJECT      
    ON MATCH GOTO ENDCASE 
ENDCASE                   
                          
CASE GETLOCATION          
 MATCH L_PIN              
   ON NOMATCH REJECT      
    ON MATCH GOTO ENDCASE 
ENDCASE 
CASE TYPEMEOUT                            
TYPE                                      
"</2 EMPLOYEE ID: <D.PIN"                 
"           NAME: <D.FIRSTNAME  <D.LASTNAME " 
"        ADDRESS: <D.L_SITE"                  
"          FLOOR: <D.L_FLOOR </2"             
ENDCASE                            
                                          
DATA 


This is what the output would look like:
EMPLOYEE ID: 000000310
NAME: JEFF LIEBER
ADDRESS: 238 BEECHWOOD PLACE
FLOOR: 24

Hope this helps. Big Grin

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Guru
posted Hide Post
Bruce,

another alternative is using Maintain. Besides from being useful for prompting etc, there's so much you could do with Maintain that Modify can't.

Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Member
posted Hide Post
Thanks to all of you for your suggestions. I thought of the TYPE ON DDNAME. My friend ended up using COMBINE and it worked fine.
 
Posts: 7 | Registered: May 25, 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     MODIFY for retrieval only

Copyright © 1996-2020 Information Builders