× 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 Sat, 27 Sep 2003, Vern Hamberg wrote:

> Ron, run the job in debug to verify the value in QualJobNm. Haven't done
> RPG in a while, does the '+' strip trailing blanks?

No, it does not.


> Also, what is JBREF - it looks like you want it to be the job name. And
> maybe use a 16-character variable for the internal ID, instead of
> *BLANKS - I'm not sure that memory is being properly allocated with the
> constant.

That depends on the prototype (which he didn't show us) if the prototype
defines that parm as "16A CONST" then *blanks should be fine.

Since he's getting a "job not found" error, it seems likely to me that
the problem is either with the prototype, or with one of the following
fields:  QualJobNm, JBREF, JAUSR, JAJNR...  I'd like to see how those
are defined?

Here's some sample code that I just wrote (and tested) and it seems
to work just fine for a job that's held on a job queue.  Granted, this
code isn't espcially useful since I didn't flesh out either the dsEC
structure or the dsJob400 structure...   but the code DOES work,  I'm just
too lazy to define all the fields (especially since that had nothing to do
with the error he's getting)

     D QUSRJOBI        PR                  ExtPgm('QUSRJOBI')
     D   RcvVar                   65535A   options(*varsize)
     D   RcvVarLen                   10I 0 const
     D   Format                       8A   const
     D   QualJobName                 26A   const
     D   IntJobID                    16A   const
     D   ErrorCode                65535A   options(*varsize)

     D dsEC            ds
     d   one                         10I 0 inz(0)
     d   two                         10I 0 inz(0)

     D dsJob400        ds
     D   dsBlah                    1024A

     d QualJobNm       s             26A

     c     *entry        plist
     c                   parm                    JBREF            10
     c                   parm                    JAUSR            10
     c                   parm                    JAJNR             6

     c                   eval      QualJobNm = JBREF +
     c                                         JAUSR +
     c                                         JAJNR

     c                   callp     QUSRJOBI(dsJob400: %size(dsJob400):
     c                                 'JOBI0400': QualJobNm: *blanks: dsEC)

     c                   eval      *inlr = *on


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.