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] MODIFY PROBLEM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] MODIFY PROBLEM
 Login/Join
 
Gold member
posted
It's been to long since I've done a modify. Can someone tell me why this one is not working? It rejects every record.

TABLE FILE CAR
PRINT 
LENGTH AS 'WIDTH'
BY COUNTRY
BY CAR
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS TEMP1 FORMAT ALPHA
END

TABLE FILE CAR
PRINT 
WIDTH
BY COUNTRY 
BY CAR 
ON TABLE HOLD AS TEMP2 FORMAT ALPHA
END
-RUN

MODIFY FILE TEMP2
  FIXFORM FROM TEMP1
  MATCH COUNTRY CAR
 ON NOMATCH REJECT 
 ON MATCH UPDATE WIDTH

DATA ON TEMP1
END
-RUN
TABLE FILE TEMP2
PRINT *
END  

This message has been edited. Last edited by: <Kathryn Henning>,


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
Expert
posted Hide Post
TEMP2, the modified file needs to be either an SQL table or a FOCUS file.


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
Virtuoso
posted Hide Post
WAZ: I thought so too, but decided to check, and lo and behold,

"Starting with Version 7.6.1, a fixed-formatted sequential file may be the target of the MODIFY procedure." - so says the Keysheet.

I imagine it only supports UPDATE.


RRKen: What's the error message?

[edit:]

By the nature of the in-place update, it would require a fixed-record-length Filedef. Better check whether that's what your HOLD generates.

This message has been edited. Last edited by: j.gross,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Now you have be interested.

I wonder if its INCLUDE only, just adding to the file.


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
Virtuoso
posted Hide Post
Waz,
You are quite right.
You can only add records to the end of an existing sequential file.


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
Virtuoso
posted Hide Post
Fortunately, the error message (apparently) doesn't spell that out. If it did, the question would never have been posted, and we would have lost the educational opportunity provided by this thread. Wink
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Why not just HOLD the second table as FORMAT FOCUS ?

That makes the MODIFY easy - INCLUDE, UPDATE, and DELETE are all supported.

Personally, I'd do the two HOLDS in reverse order and get:

TABLE FILE CAR
PRINT 
WIDTH
BY COUNTRY 
BY CAR 
ON TABLE HOLD AS TEMP2 FORMAT FOCUS
-RUN

TABLE FILE CAR
PRINT 
LENGTH AS 'WIDTH'
BY COUNTRY
BY CAR
ON TABLE SET ASNAMES ON
ON TABLE HOLD
END

MODIFY FILE TEMP2
  FIXFORM FROM HOLD
  MATCH COUNTRY CAR
 ON NOMATCH REJECT 
 ON MATCH UPDATE WIDTH

DATA ON HOLD
END
-RUN

TABLE FILE TEMP2
PRINT *
END    

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Gold member
posted Hide Post
Even with GP's code I get the same problem off all records being rejected
quote:
 0 NUMBER OF RECORDS IN TABLE=       18  LINES=     18
0 NUMBER OF RECORDS IN TABLE=       18  LINES=     18
0 ERROR AT OR NEAR LINE     25  IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC439) WARNING. A MATCH CONDITION HAS BEEN ASSUMED FOR: FOCLIST
(FOC415)TRANS     1 REJECTED  NOMATCH SEG01
ENGLAND     JAGUAR          @g?33333
(FOC415)TRANS     2 REJECTED  NOMATCH SEG01
...
0 TRANSACTIONS:         TOTAL =    18  ACCEPTED=     0  REJECTED=    18
SEGMENTS:             INPUT =     0  UPDATED =     0  DELETED =     0
0 NUMBER OF RECORDS IN TABLE=       18  LINES=     18 


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
Virtuoso
posted Hide Post
When you use the PRINT verb, the output can include multiple rows with identical sort-key ("BY" field) values. In order to give each row in the result a unique set of keys in the generated FOCUS file, when you HOLD FORMAT FOCUS, a tie-breaker field named FOCLIST is added as a low-order sort key.

(You'll see it in the output of your final PRINT * request)

Since you are not providing FOCLIST in you FIXFORM, its value defaults to zero, hence the no-match condition.

To avoid that, change PRINT to SUM in the TABLE request that produces TEMP2.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
awesome, thanks FOCLIST was my problem
thanks!


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
Master
posted Hide Post
Oops ... my bad. Forgot about FOCLIST. Thanks Jack!


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
Yes, its one of those little gems that jumps out and bites you from time to time.

Good One


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     [SOLVED] MODIFY PROBLEM

Copyright © 1996-2020 Information Builders