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



Hi,

When IBM ran performance tools etc over an application of ours, we were told
that some of our ILE RPG programs were calling QUSRJOBI multiple times each
time they were called and that this was a cause for performance issues.
After trying to understand where in our code we were making these calls, we
worked out that it was as a result of the length of the PSDS. When the same
program was coded in RPG/400, there was no such performance issue as far as
we know. We had to tell IBM that it was their implementation of retrieving
info for the PSDS in ILE RPG that was doing it. We too use a standard PSDS.


Regards,

Kevin Wright 

-----Original Message-----
From: albartell [mailto:albartell@xxxxxxxxx]
Sent: Friday, 8 September 2006 10:30 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: Costly PSDS


I am in need of creating a uniquely named data queue for a 
job. The first
idea that came to mind to ensure it is uniquely named was to 
use the job
number from the PSDS data structure which would allow me to 
create it once
for the job, and then delete it once the program was done running.  My
dilemma is the following statement in the RPG manual...
 
 
From the RPG Manual:
Call performance for LR-on will be greatly improved by having 
no PSDS, or a
PSDS no longer than 80 bytes, since some of the information 
that fills the
PSDS after 80 bytes is costly to obtain. If the PSDS is not 
coded, or is too
short to contain the date and time the program started, these 
two values
will not be available in a formatted dump. All other PSDS 
values will be
available, no matter how long the PSDS is. 
 
So based on this my question is are they referencing the 
FIRST 80 bytes or
just 80 bytes in total?  I am guessing it is the former but 
wanted to be
sure.  Really the only value from the below PSDS is JOB_NUM 
which is 6 in
length, but it starts at 264 in the PSDS.
 
One last question.  Obviously the "costly to obtain" is 
relative to your
machine, but it would be better if I had something to relate 
it to.  For
instance, it is more costly to have a 65535 character 
variable vs. a 65535
VARYING character variable if you needed to %trim a lot on 
that variable.
That may not be apples to apples, but I am just trying to 
grasp what "costly
to obtain" means.  If it was costly as in "similar to having 
to start the
JVM for your job" I would definitely go another route.
 
 
Anybody have input?
Aaron Bartell
http://mowyourlawn.com
 
 
PSDS structure (Thanks Simon Coulter:
http://faq.midrange.com/data/cache/234.html)
     D                SDS

     D PROC_NAME         *PROC
* Procedure name

     D PGM_STATUS        *STATUS
* Status code

     D PRV_STATUS             16     20S 0
* Previous status

     D LINE_NUM               21     28
* Src list line nu

     D ROUTINE           *ROUTINE
* Routine name

     D PARMS             *PARMS
* Num passed parms

     D EXCP_TYPE              40     42
* Exception type

     D EXCP_NUM               43     46
* Exception number

     D PGM_LIB                81     90
* Program library

     D EXCP_DATA              91    170
* Exception data

     D EXCP_ID               171    174
* Exception Id

     D DATE                  191    198
* Date (*DATE fmt)

     D YEAR                  199    200S 0
* Year (*YEAR fmt)

     D LAST_FILE             201    208
* Last file used

     D FILE_INFO             209    243
* File error info

     D JOB_NAME              244    253
* Job name

     D USER                  254    263
* User name

     D JOB_NUM               264    269S 0
* Job number

     D JOB_DATE              270    275S 0
* Date (UDATE fmt)

     D RUN_DATE              276    281S 0
* Run date (UDATE)

     D RUN_TIME              282    287S 0
* Run time (UDATE)

     D CRT_DATE              288    293
* Create date

     D CRT_TIME              294    299
* Create time

     D CPL_LEVEL             300    303
* Compiler level

     D SRC_FILE              304    313
* Source file

     D SRC_LIB               314    323
* Source file lib

     D SRC_MBR               324    333
* Source file mbr

     D PROC_PGM              334    343
* Pgm Proc is in

     D PROC_MOD              344    353
* Mod Proc is in

     D CURR_USER             358    367
* Mod Proc is in
-- 
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.