AS/400 Journaling

Tags:
AS/400
AS/400 journaling
I am journaling a specific file, but when I write to an out file so that I can run query against the results the record length is truncated and I lose the data I want to look at. I have tried I think everything with DSPJRN to get all of the data in the record, but with no success. A little help from someone out there would be appreciated.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,


You will get the complete data on single field when you use DSPJRN command.

You can copy that to your file (includes Journal fields) using FMTOPT(*NOCHK) on CPYF command.

Click Here for quick information on retrieving data from Journal.

Pradeep.

Discuss This Question: 12  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • fasthorses89

    Hello Pradeep,

    Not quite sure what you mean by "You can copy that to your file", what is source to copy from?  I am currently using DSPJRN to send / copy data to my outfile, with truncated results.

     

    75 pointsBadges:
    report
  • philpl1jb
    there was something about the type parameters .. like that you needed to do the dspjrn to type5???
    54,090 pointsBadges:
    report
  • philpl1jb
    how do you know it's truncated .. could the tool you're using to view it be truncating it?
    54,090 pointsBadges:
    report
  • fasthorses89

    I have tried the different types with no avail.  When i look at my outfile I am missing fields at the end of the record.

    thanks for the response.

     

    75 pointsBadges:
    report
  • PGMBOB
    You may try type 5 and let the command create the outfile. The command can create the outfile the correct size with the data appended to the journal data. Good luck!
    1,235 pointsBadges:
    report
  • philpl1jb

    I think PGMBOB is on to something.

    But "i look at my outfile I am missing fields" might be a function of the tool that you use to look at your outfile. 

    54,090 pointsBadges:
    report
  • fasthorses89
    I created a generic outfile with type 5, nothing else special.  I used Query 400 to view data.
    75 pointsBadges:
    report
  • philpl1jb

    So you've got this really long field and you're going into query/400 and doing F5 (Display) you aren't using sub string .. you're probably detecting a limit on Query/400 .. do a dsppfm and see what the end looks like compared to what you see in Query.

    54,090 pointsBadges:
    report
  • fasthorses89

    I will try.  thx

    75 pointsBadges:
    report
  • fasthorses89
    Unfortunately there is packed data fields.
    75 pointsBadges:
    report
  • philpl1jb

    Yes, there probably is packed data. but the first question is? 

    Did TYPE5 provide an extract with all the necessary data?

    If so then the second question is what do you want to do with it.

    I usually make a file .. journal fields followed by all the fields of the original file.  Then I can copy the outfile to mynewfile with *NOCHK

    and voilĂ  the fields are all available to use.


    54,090 pointsBadges:
    report
  • pdraebel
    I believe the field holding the Data is JOESD. Reading that field into a data structure based on the File description of the journaled file should do the trick.
    7,545 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: