Question

  Asked: Oct 11 2007   6:14 PM GMT
  Asked by: Diann


AS/400 Journaling download to PC - unreadable data


AS/400, Journaling (Exchange), CPYTOIMPF, unreadable

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?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400 and Exchange.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Alexa  |   Oct 11 2007  8:14PM GMT

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) )