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.
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, 2012
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, 2005
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.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
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,
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, 2012
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, 2005