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.
I need to update a table for each occurance of the ID, but my code is just updating the first instance. Can someone suggest the best way to do a match loop to keep updating records that match the particular ID.
TABLE FILE RAS-OBO_HDR_TBL
PRINT
MU_CODE
VX_NO
NA_PROFORMA_ID
NA_DATE_SENT
COMPUTE NA_DATE_PRINTED/HYYMDS = HGETC(10, 'HYYMDS');
COMPUTE NA_OUT_VAL/I1 = 1;
NA_PRINTER
-*BY VX_NO NOPRINT
WHERE NA_OUT_VAL EQ 1 ;
ON TABLE HOLD AS U1
END
-RUN
MODIFY FILE RAS-NA_PROFORMA_PRINT_TRIGGER_TBL
FIXFORM FROM U1
MATCH NA_PROFORMA_ID
ON MATCH UPDATE NA_DATE_PRINTED NA_OUT_VAL
DATA ON U1
END
-RUN
-EXIT
This message has been edited. Last edited by: Donald,
TABLE FILE EMPDATA
PRINT
PIN
COMPUTE SALARY1/D12.2M = SALARY + 1.01; AS 'SALARY'
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN
MODIFY FILE EMPDATA
FIXFORM FROM H001
MATCH PIN
-*ON MATCH ACTIVATE SALARY
ON MATCH UPDATE SALARY
ON NOMATCH TYPE "NOT FOUND"
DATA ON H001
END
-RUN
TABLE FILE EMPDATA
PRINT PIN SALARY
END
Are the values for column NA_PROFORMA_ID unique in table RAS-NA_PROFORMA_PRINT_TRIGGER_TBL?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Depending on the data source, you may have to reposition the pointer in the modify.
For example, if the first record to be match is the last one in the file, the pointer will be past the last record, a reposition will put the pointer back to the top.
This happens for FOCUS files.
I don't think it is an issue with RDBMS's though.
What data source is the table RAS-NA_PROFORMA_PRINT_TRIGGER_TBL ?
Unless what Waz describes solves this issue, "The values for column NA_PROFORMA_ID will be the same for a given group of rows that need to be updated" won't work, one input row will update one database row - you cannot use one input row to update many database rows (unless repositioning the pointer works).
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Here is the code that I am trying to use, but it is still just updating one record.
MODIFY FILE RAS-NA_PROFORMA_PRINT_TRIGGER_TBL
FIXFORM FROM U1
MATCH NA_PROFORMA_ID
ON MATCH UPDATE NA_DATE_PRINTED NA_OUT_VAL
ON MATCH GOTO NEXTVX
ON NOMATCH GOTO TOP
CASE NEXTVX
NEXT NA_PROFORMA_ID
ON NEXT UPDATE NA_DATE_PRINTED NA_OUT_VAL
ON NEXT GOTO NEXTVX
ON NONEXT GOTO ENDCASE
ENDCASE
DATA ON U1
END
-RUN
-EXIT