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



On 6/30/06, Jon Paris <Jon.Paris@xxxxxxxxxxxxxx> wrote:
Anyone know anything about the mechanics of QRCVDTAQ "under the hood".  In
particular does it use much in the way of resource while waiting?

Jon Paris
Partner400

www.Partner400.com

well I was curious so I tested it.  Here are 3 cl programs: test58crt,
test58snd, test58rcv.  In the TEST58CRT program change the value of
the &sbmmax variable. Then compile and call test58crt to run the
performance test.  When I ran it with 1000 jobs the data queue part of
the test ran great.  Every 3 seconds a message is sent to the data
queue and despite 1000 jobs sending and receiving from 500 data queues
there was no hint of a slowdown on my 400 CPW 170. ( wrksysact showed
very little CPU usage )

The SBMJOB and ALCOBJ commands I used were another story.  It took 420
seconds to submit the 500 jobs.  Then the ALCOBJ/DLCOBJ of a dtaara I
use to get all the jobs to start at the same time took about 60
seconds for all the jobs to complete that step.

-Steve


/* test58crt - submit the performance tester dtaq jobs.    */
            PGM

            dcl        &cx *dec 5
            dcl        &jobname *char 10
            dcl        &dtaqname *char 10
            dcl        &ch5 *char 5
            dcl        &lib *char 10 value('DTAQTEST')
            dcl        &sbmmax *dec 5 value(150)
            dcl        &rdyda *char 10 value('READYTORUN')

/* create the test environment.           */
            dltlib     &lib
            monmsg     cpf0000
            CRTLIB     LIB(&LIB) TYPE(*TEST) TEXT('dtaq performance +
                         tester')

/* create and lock the everyone ready to run dtaara.   */
            crtdtaara  &lib/&rdyda *char 10
            alcobj     ((&lib/&rdyda *dtaara *exclrd))


/* create the dtaqs      */
             chgvar     &cx 0
b1:          if         (&cx *lt &sbmMax) then(do)
               chgvar   &cx (&cx + 1)
               chgvar   &ch5 &cx
               chgvar   &dtaqname ('DTAQ' *cat &ch5)
               crtdtaq  &lib/&dtaqname  maxlen(80)
               goto     b1
e1:          enddo

/* submit the dtaq performance testing jobs.       */
             chgvar     &cx 0
b2:          if         (&cx *lt &sbmMax) then(do)
               chgvar   &cx (&cx + 1)
               chgvar   &ch5 &cx
               chgvar   &dtaqname ('DTAQ' *cat &ch5)

/* submit the dtaq sender and receiver jobs.                   */
               chgvar   &jobname ('SND' *cat &ch5)
               SBMJOB   CMD(CALL PGM(TEST58SND) PARM(&DTAQNAME)) +
                         JOB(&JOBNAME) JOBQ(QINTER) CURLIB(&LIB)
              chgvar   &jobname ('RCV' *cat &ch5)
              SBMJOB   CMD(CALL PGM(TEST58RCV) PARM(&DTAQNAME)) +
                         JOB(&JOBNAME) JOBQ(QINTER) CURLIB(&LIB) +
                         LOG(4 00 *NOLIST)

            goto       b2
e2:          enddo

/* release the ready to run dtaara.     */
            dlcobj     ((&lib/&rdyda *dtaara *exclrd))
endpgm

------------------------------------------------------------------------------------

/* test58rcv : dtaq performance tester receive job.      */
             PGM        parm(&InDtaq)

             dcl        &InDtaq *char 10

             dcl        &cx *dec 5
             dcl        &lx *dec 5
             dcl        &wait *dec 5
             dcl        &lib *char 10
             dcl        &msg *char 80
             dcl        &buf *char 80
             dcl        &msgmax *dec 5 value(9999)
             dcl        &nowsecs *dec 6
             dcl        &pvSecs *dec 6  value(0)
             dcl        &elapSecs *dec 6  value(0)
             dcl        &hhmmss *char 6
             dcl        &dec2 *dec 2
             dcl        &ch2 *char 2
             dcl        &chElap *char 2
             dcl        &ss *dec 2
             dcl        &mm *dec 2

/* the lib holding the performance test objects.     */
             rtvjoba    curlib(&lib)

/* loop receiving from the dtaq until "end" message.  */
             chgvar     &cx 0
b1:          if         (&cx *lt &msgmax) then(do)
               chgvar   &cx (&cx + 1)
               chgvar   &wait -1
               call     qrcvdtaq parm(&InDtaq &lib +
                          &Lx &buf &wait)
               chgvar   &msg %sst(&buf 1 &lx)
               if       (&msg *eq 'end') then(goto e1)

/* calc number of seconds in the current hour.       */
               rtvsysval qtime &hhmmss
               chgvar   &ch2 %sst(&hhmmss 3 2)
               chgvar   &mm &ch2
               chgvar   &ch2 %sst(&hhmmss 5 2)
               chgvar   &ss &ch2

               chgvar   &nowSecs (&mm * 60 + &ss)

/* calc number of seconds since the last message.     */
               chgvar   &elapSecs (&nowSecs - &pvSecs)
               if       (&elapSecs *gt 99) then(chgvar &chElap '99')
               else     (if cond(&elapsecs *le 0) then(chgvar +
                          &chelap '00' ))
               else     do
                 chgvar &dec2 &elapSecs
                 chgvar &chElap &dec2
               enddo

               sndpgmmsg (&chElap *bcat &msg)
               chgvar   &pvSecs &nowSecs
               goto     b1
e1:          enddo
             endpgm

-------------------------------------------------------------------------

/* test58snd : dtaq performance tester send job.          */
            PGM        (&InDtaq)

            dcl        &InDtaq *char 10

            dcl        &cx *dec 5
            dcl        &jobname *char 10
            dcl        &ch5 *char 5
            dcl        &lx *dec 5
            dcl        &lib *char 10
            dcl        &msgmax *dec 5 value(50)
            dcl        &dlysecs *dec 5 value(3)
            dcl        &rdyda *char 10 value('READYTORUN')

/* the lib holding the performance test objects.     */
            rtvjoba    curlib(&lib)

/* wait until the ready to run dtaara is available.      */
            alcobj     ((&lib/&rdyda *dtaara *exclrd)) wait(9999)
            dlcobj     ((&lib/&rdyda *dtaara *exclrd))

/* loop for a while sending to the dtaq     */
            chgvar     &cx 0
b3:          if         (&cx *lt &msgmax) then(do)
              chgvar   &cx (&cx + 1)
              chgvar   &lx 25
              call     qsnddtaq parm(&InDtaq &lib +
                       &Lx 'run i5/OS on p5 hardware!')
              dlyjob   &dlysecs
              goto     b3
e3:          enddo

/* the "end the receiver" message.      */
            chgvar     &lx 3
            call       qsnddtaq parm(&InDtaq &lib +
                       &Lx 'end')

            endpgm

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.