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 have written the below focus mainframe code wherein i am deleting transactions from the focus database using MODIFY feature. I want to log all the deleted transaction. The LOG ACCEPT only only the accepted transaction i.e. 4 in below case. If we see the output of the below code, it shows that there are 649 lines deleted. Can i log all those 649 line deleted in some PS file using some command
MODIFY FILE R5482M01.BASE.POL.NUM CHECK 99999 LOG NOMATCH ON NMACH LOG DUPL ON DUPL LOG ACCEPT ON ACCPT FIXFORM BASE.POL.NUM/7 PLN.CH.EF.DY/8 PL.LST.CH.DY/8 MATCH BASE.POL.NUM ON MATCH CONTINUE ON NOMATCH REJECT MATCH PLN.CH.EF.DY PL.LST.CH.DY ON MATCH DELETE DATA ON TSSTDEL END
Unfortunately, since a single transaction deletes dozens or hundreds of records in this case, the logging of transactions will not produce a list of all deleted records. You might be able to accomplish this with the use of NEXT and CASE logic, but the MODIFY code becomes complicated.
The easiest approach may be to generate a list of records that meet the delete criteria before-hand. How is file TSSTDEL created? Is it the result of a TABLE FILE? If so, you could print a report of all records that meet the delete criteria before running the MODIFY and then verify that the number of lines (&LINES) from the report matches the number of deleted segments (&DELTD) from the MODIFY.
EDIT: Sorry, but I mistakenly said that &LINES should equal &DELTD. &DELTD will exceed &LINES because &LINES will equal the number of report records, while &DELTD will equal the number of deleted segments - in this case one record consists of many segments.
Otherwise, CASE/NEXT logic might look something like this. Mixing MATCH and NEXT logic can be dangerous so proceed with caution. This example arbitrarily assumes two key levels below PL.LST.CH.DY (keyname4 and keyname5) - keyname5 being the last key in the table hierarchy.
MODIFY FILE R5482M01.BASE.POL.NUM
FIXFORM BASE.POL.NUM/7 PLN.CH.EF.DY/8 PL.LST.CH.DY/8
GOTO KEYMATCH
CASE KEYMATCH
MATCH BASE.POL.NUM PLN.CH.EF.DY PL.LST.CH.DY
ON MATCH GOTO KEYNEXT
ON NOMATCH REJECT
ON NOMATCH GOTO TOP
ENDCASE
CASE KEYNEXT
NEXT <keyname4>
ON NEXT GOTO LOGDELS
ON NONEXT GOTO DELRECS
ENDCASE
CASE LOGDELS
NEXT <keyname5>
ON NEXT TYPE ON DELTRANS
"will be deleted: <BASE.POL.NUM <PLN.CH.EF.DY <PL.LST.CH.DY <keyname4 <keyname5 "
ON NEXT GOTO LOGDELS
ON NONEXT GOTO KEYREMATCH
ENDCASE
CASE KEYREMATCH
ACTIVATE RETAIN BASE.POL.NUM PLN.CH.EF.DY PL.LST.CH.DY <keyname4>
MATCH BASE.POL.NUM PLN.CH.EF.DY PL.LST.CH.DY <keyname4>
ON MATCH GOTO KEYNEXT
ON NOMATCH TYPE
"NOMATCH error in CASE KEYREMATCH: This should NEVER happen!!!"
ON NOMATCH GOTO EXIT
ENDCASE
CASE DELRECS
ACTIVATE RETAIN BASE.POL.NUM PLN.CH.EF.DY PL.LST.CH.DY
MATCH BASE.POL.NUM PLN.CH.EF.DY PL.LST.CH.DY
ON MATCH TYPE ON DELTRANS
"deleted: <BASE.POL.NUM <PLN.CH.EF.DY <PL.LST.CH.DY "
ON MATCH DELETE
ON MATCH GOTO TOP
ON NOMATCH TYPE
"NOMATCH error in CASE DELRECS: This should NEVER happen!!!"
ON NOMATCH GOTO EXIT
ENDCASE
CASE AT START
CHECK 99999
LOG NOMATCH ON NMACH
LOG DUPL ON DUPL
LOG ACCEPT ON ACCPT
ENDCASE
DATA ON TSSTDEL
END
This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
I just discovered an error in the MODIFY code I posted earlier. In CASE DELRECS I had specified "ON MATCH/NOMATCH GOTO EXIT", but in the case of ON MATCH, the logic should GOTO TOP. I have corrected my earlier post.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Of course, you could also do a TABLE first, selecting all the records that are going to be deleted (using the same transaction file as you'll be using in the modify), hold it to a file that you can archive, and then do the modify.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007