AS/400 Journaling download to PC – unreadable data

pts.
Tags:
AS/400
CPYTOIMPF
Journaling (Exchange)
We are journaling some files on the AS/400 and need to download the journal entries to a pc based file. We are using the DSPJRN command to copy the journal entries to a db file and then using the CPYTOIMPF command to convert it to a text file. This issue is that some of the data is unreadable. We believe this has something to do with the default CCSID that is set by IBM that is not converting the data. Does anyone have any easy solutions of how to get the data in a readable format without creating an RPG program?

Answer Wiki

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

The Journal contains the entire record image as a binary field: character type fields are ok, packed and negative signed fields and a lot of newer field types are going to remain in their binary form when you do dsp journal. Since it’s then moved to the IFS as a single field it cannot be decoded.

The journalled data needs to be restored or moved in some way on the 400 to the physical file structure that it originaled in and then it can be decoded.

It’s been a LONG time, but maybe I can get you started. I used the DSPJRN command to copy the entries to a pf as you are doing. I then looked carefully at the file using DSPPFM and found the undisplayable characters – I believe there are two bytes in the file that are in binary format. I created a query to read the file, parse out the two bytes to a shorter field, and output from the query to another pf. Then I could move the new file to my pc without any problems. Not an elegant solution, but it worked for what I needed at the time.

Discuss This Question: 1  Reply

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Alexa
    I had used the CPYTOIMPF as follows : CPYTOIMPF FROMFILE(&FILELIB/&FILE) + TOSTMF('/QIBM/Folder/file.txt') + MBROPT(*REPLACE) STMFCODPAG(*PCASCII) + RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM(*NONE) + FLDDLM('|') The Key(STMFCODPAG(*PCASCII) )
    0 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following