× 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: Qualified vs Unqualified calls (Was: Database server jobs and SQL tuning)
  • From: John Earl <johnearl@xxxxxxxxxxxxxxx>
  • Date: Mon, 22 May 2000 01:16:54 -0700
  • Organization: The PowerTech Group

Al,

Please don't take this personally, but a certain amount of skepticism is
warranted for most of the folklore about performance on an AS/400.  I understand
what your
Instructor was trying to convey, and technically he may be correct, but
practically I just don't believe that there are any performance problems with
qualified program calls.  Further, I have a hard time believing that even if
there were a difference, it would be large enough to matter.  I guess the only
way to tell for sure is to run a test....

<Several hours later>
OK, I'm done.

I just ran a test on one of our /400's that would seem to indicates that your
instructor's information is incorrect, outdated, or irrelevant.  The tests
indicate that
an unqualified call appears to take a little longer than a qualified call.  See
below for the test results.

MacWheel99@aol.com wrote:

> >  From:    DBale@lear.com (Bale, Dan)
> >
> >  Wow.  Is this documented, Al?
>
> Referring to my remarks about qualifying vs. library list
>
> John Earl also challenged what I thought I had learned in IBM school.
>
> I could not find explicit clarification in any of my manuals, so I e-mailed
> question to IBM school asking what I had absorbed incorrectly on this topic &
> here is the reply from one of my IBM professors:
>
> QUOTE
>
> Al,
>
> When access is requested to an object and *LIBL is specified for the object
> the library list information is used to check authority for the LIBRARY. If a
> qualified name is specified, the authority for the LIBRARY is specifically
> checked, even if the library is included in the user's library list.
>
> *LIBL has the system establishing LIBRARY authorities for the libs in the
> list.
> Subsequent LIBRARY authority lookups are not going to be done UNLESS
> the lib_name/obj_name qualification is used. The system will lookup the
> authority the user has to the library every time a qualified reference is
> used.
>
> That's just for the library. The system then has to handle the security
> for the object itself. Hope that helps.
>
> Eric J. Jackson
> Sr. Education Specialist - AS/400
> IBM Learning Services
> 330 N. Wabash, 4th floor
> Chicago, IL 60611
>
> UNQUOTE
>
> My primary interest is in correcting any misconceptions that I had had.
> My conclusion from this is that my prior statement was a simplification, but
> that overall it is true that there is more security checking by qualification
> than by library list.  One thing that is not clear to me is in the case of a
> library with thousands of program objects ... including that in library list
> might result in excess checking, also hurting performance.
>
> ie. our folks sign onto BPCS & they do not get the BPCS logo instantaneously,
> because their library list is being heavily loaded with access to approx 20%
> of the stuff in 12 Gig.  That lag does not bother me yet.
>
> Al Macintyre  ©¿©
> http://www.cen-elec.com MIS Manager Programmer & Computer Janitor
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

For this test I created a program called "A" and put it in library "JOHN".
Program "A" has a single statement:
 C                   EVAL      *INLR = *ON

By ending the program with LR on after each call, I am causing a security lookup
with each call to the program, rather than reusing an open version of the
program.

Then I created two CL programs (TEST1 and TEST2) that call program "A" a 
variable
number of times.  The variable number is passed into the program using the
parameter "&Iter".  Program "TEST1” did an unqualified call (CALL A), and 
program
"TEST2" a qualified call ( CALL JOHN/A ).  Here is the code for the
unqualified call:

0001.00 PGM        &Iter
0002.00
0003.00 DCL        &Count      *Dec     ( 15 5 )
0004.00 DCL        &EndMsg     *Char      80
0005.00 DCL        &Iter       *Dec     ( 15 5 )
0006.00 DCL        &Iter_Char  *Char      15
0007.00 DCL        &StartMsg   *Char      80
0008.00
0009.00 CHGVAR &Iter_Char  &Iter
0010.00 CHGVAR &EndMsg   ('End call of 1 unqualified program' *BCAT +
0011.00                    &Iter_Char *BCAT 'times')
0012.00 CHGVAR &StartMsg ('Begin call of 1 unqualified program' *BCAT +
0013.00                    &Iter_Char *BCAT 'times')
0014.00 SNDJRNE    JRN( QAUDJRN ) TYPE( 'PT' ) ENTDTA( &StartMsg )
0015.00
0016.00 LOOP:
0017.00 CHGVAR    &Count ( &Count + 1 )
0018.00 CALL A
0019.00 IF  ( &Count *NE &Iter )  THEN( GOTO CMDLBL( LOOP ))
0020.00
0021.00 SNDJRNE    JRN( QAUDJRN ) TYPE( 'PT' ) ENTDTA( &EndMsg )
0022.00
0023.00 SNDMSG     MSG( &EndMsg ) TOUSR(JOHN)
0024.00 ENDPGM

The difference between "TEST1" and "TEST2" was that line 18 of "TEST2" looked
like this:
    0018.00 CALL JOHN/A

and the journal entry messages were changed.  Here is "TEST2":

0001.00 PGM        &Iter
0002.00
0003.00 DCL        &Count      *Dec     ( 15 5 )
0004.00 DCL        &EndMsg     *Char      80
0005.00 DCL        &Iter       *Dec     ( 15 5 )
0006.00 DCL        &Iter_Char  *Char      15
0007.00 DCL        &StartMsg   *Char      80
0008.00
0009.00 CHGVAR &Iter_Char  &Iter
0010.00 CHGVAR &EndMsg   ('End call of 1 qualified program' *BCAT +
0011.00                    &Iter_Char *BCAT 'times')
0012.00 CHGVAR &StartMsg ('Begin call of 1 qualified program' *BCAT +
0013.00                    &Iter_Char *BCAT 'times')
0014.00 SNDJRNE    JRN( QAUDJRN ) TYPE( 'PT' ) ENTDTA( &StartMsg )
0015.00
0016.00 LOOP:
0017.00 CHGVAR    &Count ( &Count + 1 )
0018.00 CALL JOHN/A
0019.00 IF  ( &Count *NE &Iter )  THEN( GOTO CMDLBL( LOOP ))
0020.00
0021.00 SNDJRNE    JRN( QAUDJRN ) TYPE( 'PT' ) ENTDTA( &EndMsg )
0022.00
0023.00 SNDMSG     MSG( &EndMsg ) TOUSR(JOHN)
0024.00 ENDPGM

The Library list for the job was as follows:

LIBMSYS     SYS       PowerTech IBM System Library
LUSRSYS     SYS       PowerTech User System Library
QSYS        SYS       System Library
QSYS2       SYS       System Library for CPI's
QHLPSYS     SYS
QUSRSYS     SYS
POWERLOCK   PRD       PowerLock Network Security Product Library
QGPL        USR
QTEMP       USR
JOHN        USR       Programmer library for John Earl

The tests were run under User Profile "JOHN" who has no special authorities.
"JOHN" is a member of group "PROG" which has *JOBCTL and *SAVSYS
special authorities.

I ran three sets of tests.  For each set I called programs TEST1 and TEST2
twice.  The first time I passed a value of 10,000 to the programs and the second
time I
passed a value of 100,000 to the programs.  Using the SNDJRNE commands allowed 
me
to log the start and end time of these loops.  The tests were run on a
model 170 with 128MB of Memory and 8GB of disk.  OS version is V4R3.  There were
no other active jobs other than my workstation during the tests, and I refrained
from hitting any keys until the completion message appeared on my screen.  The
results were as follows:

                        First Test                        Second
Test                 Third Test
                  UnQual       Qualified      UnQual     Qualified
UnQual      Qualified
100000      14:09:29     14:05:42      22:23:59    22:38:04      23:20:43
23:33:29
Calls           14:13:30     14:09:08      22:27:51    22:41:27      23:24:54
23:36:52
Difference    0:04:01       0:03:26       0:03:52      0:03:23
0:04:11       0:03:23


10000        13:52:12     14:03:39      22:46:46     22:46:22      23:17:41
23:18:08
Calls           13:52:36    14:04:00      22:47:09     22:46:42      23:18:05
23:18:28
Difference     0:00:24      0:00:21        0:00:23       0:00:20
0:00:24       0:00:20

These tests indicate that their is slightly _better_ performance with a 
qualified
call than with an unqualified call.  So while the technical description that 
your
instructor gave you may still be true, the actual effect on performance is the
opposite of his predictions.

But even if the results were reversed, one has to ask how important performance
is in this circumstance?  If 10,000 calls runs 3 - 4 seconds longer and 100,000
calls run anyhere from 29 - 48 seconds longer how many applications will really
be slowed down by choosing one way over the other?  If you've got an interactive
app
that refers to 3 or even 10 unqualified objects, will anyone notice that you
didn't qualify them?   If you have a batch job that refers to 250,000 
unqualified
objects
and it runs 2 minutes longer, who will know?

A good summary would be that this performance "issue", like many of the other
performance legends that we carry forward from the days when machines were
slow, only serves to distract us from the real task at hand (building sound
applications).   A secondary point is that whenever someone claims that one
method
performs better or worse than another, it ought to be really easy to test the
claim on our own.

All of this is of course, JMHO, and you're welcome to repeat the test on your 
own
machine and tell us whether you get corroborating results.

jte
(Convalescing, with obviously too much time on his hands :)


--
John Earl                               johnearl@400security.com
The PowerTech Group                     206-575-0711
PowerLock Network Security              www.400security.com
--


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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:
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.