× 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.



not sure if this will run any faster. 
Here is basically what it does:
1) declare the outfile as internal describe file.  I'm thinking RPG will not 
load each field at a time in this case.  
2) Declare a data structure and set the based pointer to be the address of 
JOESD field. 



FMYFILE    UF A F 2048    31AIDISK                     
FJOURNALPF IF   E             DISK                     
 *                                                     
                                                       
D myFileDS        DS          2048    based(p_myFileDS)
D p_myFileDS      s               *   inz(%addr(JOESD))
D notUse          DS          2048                     
D myKey           s             31                     
                                                       
C                   read      JOURNALPF                
C     myKey         chain     MYFILE        notUse     
C                   if        %found                   
C                   update    MYFILE        myFileDS   
C                   else                               
C                   write     MYFILE        myFileDS   
C                   endif                              
                                                       
C                   eval      *inlr = *on              


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of
CarollaT@xxxxxxxxxxxxxx
Sent: Friday, September 03, 2004 12:37 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: CHAIN to a DS


Since writing this, the strategy has changed, so I am doing the following:
 
1.        Read journal entries from several TRANS files (all exact same
format, different libraries) into an output file (using DSPJRN - I know,
Scott -- I should be using an API ;)
2.           Read through each journal entry, and place the record image
field (JOESD) into an externally-described DS, based on the TRANS file
(minus one field)
3.           Attempt a chain to the Master TRANS file (fields prefixed with
a 'D')
4.           Place all fields of data from the DS into the Master TRANS file
5.           Update or Write the Master TRANS file, based on the results of
the CHAIN op
 
I just wanted to know if there was a way to avoid step four - because there
are a lot of fields, and I want this to run fast Fast FAST.  If I avoid
prefixing the Master TRANS file fields, then the fields in the external DS
would be the same fields, right?  So after I populate the DS with the
journal image, I want to position myself to do a write or update to the
Master TRANS file, without replacing the contents of these fields.  I am
pretty sure you can't do an UPDATE after doing a SETLL, otherwise, I could
do a SETLL, then check the %EQUAL bif, and optionally update or write.  
 
SQL is not _really_ an option, because we don't have the development LP.  I
know there is still a way to interact using SQL, but I haven't really 'gone
there' yet.  

 

Tony Carolla

MedAmerica Billing Services, Inc.

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


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.