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.
First, I don't think the FOCUS or WebFOCUS ever puts anything in any & variable for SQL INSERT, UPDATE or DELETE.
With your app, the thing to keep in mind is that when doing updates like this, you are only doing 1 row at a time so your status:
(FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND : 1/UPDATE
is telling you that your program update the row.
To do multiple rows, if all of your updates are in SAVE.FTM you have to do something like this:
-LOOP1
-READ SAVE NOCLOSE &AGENCY.3. &FUND.8. &SFY.4. &WARRANT.10. &CLIENT.8.,
-, &SEQ.5. &PLCSQ.5. &CASEID.8.
-IF &IORETURN NE 0 THEN GOTO END1;
-*
SET SQLENGINE=SQLORA
SQL SET SERVER KIDS
SQL UPDATE TCLIENT_PAYMENT
SET CAS_ID = &CASEID ,
PLC_SEQ_NBR = &PLCSQ
WHERE AGCY_ISSUED_BY = &AGENCY
AND FUND_PAID_FROM = &FUND
AND STATE_FISCAL_YR = &SFY
AND WARRANT_NBR = &WARRANT
AND CL_ID = &CLIENT
AND SEQ_NBR = &SEQ ;
SQL COMMIT ;
END
-RUN
-GOTO LOOP1
-*
-END1
-CLOSE SAVE
With this, you will get a FOC1364 for every update. This can generate a lot of output if one is updating hundreds or thousands of rows. That is why I will set PASSRECS ON or OFF depending on the number of rows expected. If you set PASSRECS OFF, the you can do your own counts within the Dialogue Manager.
Note, even MODIFY generates a separate SQL UPDATE command for every transaction. But MODIFY does an additional SQL SELECT to see if the row exists. By coding your own SQL UPDATE, you save the I/O for that additional SQL SELECT.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Francis, I took the original posters question to be about keyed updates, like MODIFY. I also do updates like your example were I want to update multiple rows based on an index or partial key and get results like your example.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
What is your problem with this? Because what this topic describes is that when you do a sql passthru command, then you will not be notified of the amount of records affected other then in this message (FOC1364) string, regardless of the SET PASSRECS setting.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007