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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
I assume that what you mean is that if a record already exists in the file being modified - M1247FF - then you don't want to process any matching incoming records from the HOLD file.
The following will accomplish that.
MODIFY FILE M1247FF FIXFORM FROM M1247FIN MATCH CUST_ID ACCT_ID ON MATCH REJECT ON NOMATCH INCLUDE DATA ON M1247FIN END
However you say "wherever the CUST_ID or the ACCT_ID is in the source file (M1247FIN), I want it rejected". The tricky part here is the OR in your statement. Right now you are matching on two keys. If both of those are in the same segment I don't think you can easily deal with the OR - both have to be a match to the incoming data to get the REJECT to work.
However, as Waz hints, if the CUST_ID is in a top segment and the ACCOUNT_ID in a lower segment (or vice versa) than you can MATCH them independently and INCLUDE or REJECT appropriately.
George - Most important, I don't want the ACCT_ID to be included if matched. But it is possible (albeit unlikely) that a CUST_ID could change for an ACCT_ID thereby creating a scenario where that customer ends up in my universe of accounts after other suppressions. I did not see a code sample from Waz, so I'm not sure if there is a solution.
The source is a flat file. I suppose I could create a two step process and join that hold first on CUST_ID, suppress and hold, then join on ACCT_ID, suppress and hold. Then append to my final DB2.
WF (App Studio) 8.2.01m / Windows Mainframe FOCUS 8
Are you willing to gamble that the CUST_ID and ACCT_ID will forever be linked?
If it's only the ACCT_ID that you want to act on then create your M1274FF.MAS with a single key, namely ACCT_ID. Make CUST_ID a normal, non-key field.
Reporting from a flat file is not a problem - I assume you have a MFD / Synonym already created for that.
Probably the easiest thing to do is create a HOLD file from the contents of your flat file. Then the MODIFY becomes a piece of cake:
TABLE FILE M1247FIN
PRINT field list
ON TABLE HOLD
MODIFY FILE M1247FF
FIXFORM FROM HOLD
ON MATCH REJECT
ON NOMATCH INCLUDE
DATA ON HOLD
If you do it this way you don't have to worry about specifying the fieldname and length for each item in the FIXFORM command. The HOLD file will have everything sequenced the way you want and will create a temporary synonym that contains the field lengths to be used in the MODIFY. It might be possible to do this directly from the flat file, but I've never tried it in nearly 30 years worth of MODIFYs.This message has been edited. Last edited by: George Patton,