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



I have a service program which does the below.
The problem is that when the joblog contains CPF9802, the ExceptionId is 
blank.
Let me guess, when I code (e) on the callp I need to check %error and the 
exception id from the PSDS instead, right?  Because I did run this in 
debug and the exception id of the psds was getting updated with the 
CPF9802.  Just slays me that they have a nice error exception area in the 
API's that they could put this into but instead they make me use two 
methods of error trapping.

Do I have to do the %error check or do I just have my logic all fubar?


      /eject
     P     CheckPrf    B                   EXPORT
      ***** CheckPrf - Checks for the existance of a user profile.  .)
      *          - Input:  User profile to check.  10 charasters.
      *          - Result: Logical variable.  On=yes, off=no.
     D CheckPrf        PI              N
     D   UserProfile                       like(UserId)
     D
     C* We will check for the user profile by doing an API call to
     C* RTVOBJD.  If the user profile does not exist we will have a 
CPF9801.

     C*  Set the length of the varialble length variable to the format we
     C*  are currently using.
     C*                  eval      %len(QUSROBJDP)=%len(objd0100p)

     C*  Initialize the error code.
     C                   clear                   ERRC0100
     C                   eval      errc0100p=errc0100

     C                   callp(e)  QUSROBJD(OBJD0100:
     C                                      %len(objd0100):
     C                                      'OBJD0100':
     C                                      UserProfile + '*LIBL     ':
     C                                      '*USRPRF   ':
     C                                      ERRC0100P)
     C                   eval      errc0100=errc0100p
     C                   Select
     C                   when      ExceptionId=*blanks
     C                   return                  *on
     C                   when      ExceptionId='CPF9802'
     C* CPF9802=not authorized.  We just care that it exists.
     C* Therefore, we'll accept this.
     C                   return                  *on
     C                   Other
     C                   return                  *off
     C                   EndSl

     P     CheckPrf    E

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.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.