Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove restriction for FILE to exist with DSPJRN #26

Open
kskuhlman opened this issue Nov 26, 2019 · 2 comments
Open

Remove restriction for FILE to exist with DSPJRN #26

kskuhlman opened this issue Nov 26, 2019 · 2 comments

Comments

@kskuhlman
Copy link
Member

DSPJRN with the FILE parameter requires the table to exist, currently be attached to the journal, etc. This can make it difficult to dump journal transactions when the table has changed, if the analysis is being done on another server, etc.

Workaround:
Two ways:
(a) Leave the FILE parameter blank & dump all transactions, then go back and filter out the ones you don't need.
(b) Perform journal analysis on the same system as where the transactions happen.
(c) Use the Display_Journal UDTF

Proposal:
If FILE is specified on DSPJRN, do not check for it's existence or any properties of it. This is just like the behavior when FILE is not provided, or when using the UDTF.

@kskuhlman
Copy link
Member Author

UDTF example:

SELECT * 
FROM TABLE (Display_Journal('TSTLIB', 'QSQJRN')) AS x
WHERE OBJECT_TYPE IN('*FILE','*QDDS') AND SUBSTR(object,1,10) = 'TBL1' 
 AND SUBSTR(object,11,10) = 'TSTLIB' 
ORDER BY entry_timestamp

@kskuhlman
Copy link
Member Author

We can just wrap the command & adding a CHKOBJ to it. If target doesn't exist then add a bogus 2nd file & do the DSPJRN as normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant