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


  • Subject: Re: Based variables
  • From: rob@xxxxxxxxx
  • Date: Fri, 8 Dec 2000 12:39:04 -0500


Forgive my ignorance.  But does an object in QTEMP get written out to disk
like an object in a real library?  For example does a user space in QTEMP
really go out to disk (not counting memory paging).  If it doesn't go out
to disk, then wouldn't it only hit disk for paging, sort of like a large
array would?  Is there anyone who would really know this, or, is this
something you need to test whilst running performance tools?

Then again which would perform better, a user space or a file, provided
they both reside in QTEMP?

Rob Berendt

==================
Remember the Cole!


                                                                                
                                       
                    "M. Lazarus"                                                
                                       
                    <mlazarus@ttec.co        To:     RPG400-L@midrange.com      
                                       
                    m>                       cc:                                
                                       
                    Sent by:                 Subject:     Based variables       
                                       
                    owner-rpg400-l@mi                                           
                                       
                    drange.com                                                  
                                       
                                                                                
                                       
                                                                                
                                       
                    12/08/00 12:00 PM                                           
                                       
                    Please respond to                                           
                                       
                    RPG400-L                                                    
                                       
                                                                                
                                       
                                                                                
                                       




Hi all,

  I have a program that uses a based (not to waste unused memory) array,
DIM'ed to the max (32,767).  The reason I chose that route is for
performance.  The application must output the same batch data multiple
times, once for each store.

  In order to do this via a *PF, I would have to read each batch over and
over in order to output the batch for each store.  That just rubs me wrong,
since there can be up to 5,000 stores and an undetermined number of
batches.

  My solution was to read through a batch, loading the array via an
externally described DS referencing the input file, moving the pointer up
for each record.

  So far, this works well, since the current expected maximum number of
records per batch is less than 5,000.  I'm trying to think ahead and would
like to accommodate a much larger batch.
Input record length that I am storing in the array is 148.

  According to the RPG manual, ALLOC can handle 16,776,704 bytes.  Is there
a way I can create a based field that would handle the maximum
length?  That would bump up the maximum records from 32,767 to 113,356
(16776704 / 148).

  I know that this can be done via a *USRSPC, but wouldn't that incur
additional disk I/O?


Store file = primary

     Store ID
        1
        5
        6
       10
      etc... (5,000 maximum)


Batch file = secondary

     Batch  Seq#
       1  1
       1  2
       2  1
       2  2
       2  3
       2  4
     etc. etc.

Output

Store     Batch  Seq#
   1   1  1
   1   1  2
   1   2  1
   1   2  2
   1   2  3
   1   2  4
   5   1  1
   5   1  2
   5   2  1
   5   2  2
   5   2  3
   5   2  4
   6   1  1
   6   1  2
   6   2  1
   6   2  2
   6   2  3
   6   2  4
     etc. etc.


  Any suggestions?

  TIA.

  -mark

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.