× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here's a technique I devised for converting unformatted data held in a
journal to the original format.

Let's imagine you have extracted journal images for a database file called
MYFILE and put the journal output in an outfile called DSPJRNOUTF.
DSPJRNOUTF will contain a field called JOESD which holds the after (and
maybe before) images of records from MYFILE as unformatted data. You can
convert these to records in a copy of MYFILE like this.

1. Create a temporary file called JOESD, e.g.

CRTPF QTEMP/JOESD RCDLEN(length)

where length is the length of field JOESD in DSPJRNOUTF.

This will create a file with a single field called JOESD (i.e. matching the
journal data field in DSPJRNOUTF).

2. Copy the journal images into the temporary file, e.g.

CPYF DSPJRNOUTF QTEMP/JOESD MBROPT(*REPLACE) FMTOPT(*MAP *DROP).

This will just extract the contents of the JOESD field into the temporary
file.

3. Create a temporary copy of your live MYFILE file, e.g.

CRTDUPOBJ MYFILE FROMLIB(MYLIB) OBJTYPE(*FILE) TOLIB(QTEMP)
TOOBJ(MYFILETEMP) DATA(*NO)

4. Copy the contents of temporary file JOESD to the TEMPORARY COPY of
MYFILE, e.g.

CPYF QTEMP/JOESD QTEMP/MYFILETEMP MBROPT(*REPLACE) FMTOPT(*NOCHK)
ERRLVL(*NOMAX)

You now have your journal images in QTEMP/MYFILETEMP in their original
format.

The ERRLVL(*NOMAX) bit is there in case MYFILETEMP is keyed with unique
keys - this will drop any duplicates.

Pete
<fupingren@xxxxxxxx> wrote in message
news:000a01c2fa42$cd8a1780$a10010ac@xxxxxx
> Dear Guys,
>
>     How to display JRN without non-display character, Example for '?' ,
'|',......
>
> Rgds!
> Ren
>



> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.