PDA

View Full Version : Extract records from journal



Guest.Visitor
01-01-1995, 02:00 AM
I seem to recall a great tip posted in here somewhere or maybe printed in MC about a year ago that showed how to easily extract record images from a journal into an outfile and query against the outfile....but I can't find it. My memory is foggy but I believe only certain journal types were extacted and the resulting outfile had one field in it and could be copied to a temporary image of the original database. Can anyone help me? Thanks. Chris

Guest.Visitor
07-01-1999, 01:01 PM
On Thursday, July 01, 1999, 11:16 AM, Chris Ringer wrote: I seem to recall a great tip posted in here somewhere or maybe printed in MC about a year ago that showed how to easily extract record images from a journal into an outfile and query against the outfile....but I can't find it. My memory is foggy but I believe only certain journal types were extacted and the resulting outfile had one field in it and could be copied to a temporary image of the original database. Can anyone help me? Thanks. Chris <HR>Are you thinking about RTVJRNE; I think it was an article in MC...... <pre> <H4>Bob Hamilton TEXAS BUSINESS SYSTEMS 736 Pinehurst Richardson, Texas 75080 <h4> </pre></h4></h4>

Guest.Visitor
07-06-1999, 10:46 AM
On Thursday, July 01, 1999, 11:16 AM, Chris Ringer wrote: I seem to recall a great tip posted in here somewhere or maybe printed in MC about a year ago that showed how to easily extract record images from a journal into an outfile and query against the outfile....but I can't find it. My memory is foggy but I believe only certain journal types were extacted and the resulting outfile had one field in it and could be copied to a temporary image of the original database. Can anyone help me? Thanks. Chris Hi Chris - Here are the three key statements from my CL that I use for this purpose: DSPJRN JRN(&JRNLIB/&JRN) RCVRNG(&JRNLIB/&START + &JRNLIB/&END) JRNCDE((R)) ENTTYP(*ALL) + OUTPUT(*OUTFILE) OUTFILFMT(*TYPE2) + OUTFILE(QTEMP/DUMPOUT) ENTDTALEN(*CALC) CRTPF FILE(&LIB/&FILE) SRCFILE(&DDSLIB/&DDSSRC) + SRCMBR(&DDSMBR) OPTION(*NOLIST) + SIZE(50000 5000 100) CPYF FROMFILE(QTEMP/DUMPOUT) + TOFILE(&LIB/&FILE) MBROPT(*ADD) + FROMRCD(1) FMTOPT(*NOCHK) Sorry about the parameters, but I think most of them are self-explanitory. I need to create a DDS member for each file that I need to do this with; The following is a sample. You can see that the defined fields are the same for each instance and the "ref'ed" fields get replaced each time I have to create a new file. </FONT><FONT FACE="Courier New" SIZE=2> A REF(FREF) A R QJGLPOST A JOENTL 5S 0 TEXT('Length of entry') A COLHDG('ENTRY' 'LENGTH') A JOSEQN 10S 0 TEXT('Sequence number') A COLHDG('SEQUENCE' 'NUMBER') A JOCODE 1A TEXT('Journal Code') A COLHDG('CODE') A JOENTT 2A TEXT('Entry Type') A COLHDG('TYPE') A JODATE 6A TEXT('Date of entry: Job date for- A mat') A COLHDG('DATE') A JOTIME 6S 0 TEXT('Time of entry: hour/minute/- A second') A COLHDG('TIME') A JOJOB 10A TEXT('Name of Job') A COLHDG('JOB' 'NAME') A JOUSER 10A TEXT('Name of User') A COLHDG('USER' 'NAME') A JONBR 6S 0 TEXT('Number of Job') A COLHDG('JOB' 'NUMBER') A JOPGM 10A TEXT('Name of Program') A COLHDG('PROGRAM' 'NAME') A JOOBJ 10A TEXT('Name of Object') A COLHDG('OBJECT' 'NAME') A JOLIB 10A TEXT('Objects Library') A COLHDG('LIBRARY' 'NAME') A JOMBR 10A TEXT('Name of Member') A COLHDG('MEMBER' 'NAME') A JOCTRR 10S 0 TEXT('Count or relative record nu- A mber changed') A COLHDG('COUNT/' 'RRN') A JOFLAG 1A TEXT('Flag: 1 or 0') A COLHDG('FLAG') A JOCCID 10S 0 TEXT('Commit cycle identifier') A COLHDG('COMMIT' 'CYCLE ID') A JOUSPF 10A TEXT('User Profile') A COLHDG('USER' 'PROFILE') A JOSYNM 8A TEXT('System Name') A COLHDG('SYSTEM' 'NAME') A JORES 20A TEXT('Not used') A COLHDG('RESERVED') A ACT R A AMTDOL R A APP R A AUDOPR R A AUDTIM R A DTETRN R A DOCSRC R A GLREF R A LOC R A LINED R A PERIOD R A QTR R A QTYAMT R A REFER R A STQTY R A UNITS R A WEEK R A YEARCT R A A YEAR R </FONT> Sorry about the formatting. Just email me and I can send you better versions if you want. I hope this helps! JC