|
Hello Luis,
Here's an RPG/IV sample:
**-- Header specifications: --------------------------------------------**
H Option( *SrcStmt )
**-- Global variables: -------------------------------------------------**
D ObjNam s 10a
D ObjLib s 10a
D ObjTyp s 10a
**-- Api error data structure: -----------------------------------------**
D ApiError Ds
D AeBytPro 10i 0 Inz( %Size( ApiError ))
D AeBytAvl 10i 0 Inz
D AeMsgId 7a
D 1a
D AeMsgDta 128a
**-- Object description structure OBJD0100: ----------------------------**
D RoData Ds
D RoBytRtn 10i 0
D RoBytAvl 10i 0
D RoObjNam 10a
D RoObjLib 10a
D RoObjTypRt 10a
D RoObjLibRt 10a
D RoObjASP 10i 0
D RoObjOwn 10a
D RoObjDmn 2a
D RoObjCrtDts 13a
D RoObjChgDts 13a
D RoExtAtr 10a
D RoTxtDsc 50a
D RoSrcF 10a
D RoSrcLib 10a
D RoSrcMbr 10a
**-- Retrieve object description: --------------------------------------**
D RtvObjD Pr ExtPgm( 'QUSROBJD' )
D RoRcvVar 32767a Options( *VarSize )
D RoRcvVarLen 10i 0 Const
D RoFmtNam 8a Const
D RoObjNamQ 20a Const
D RoObjTyp 10a Const
D RoError 32767a Options( *VarSize )
**
**-- Get Web value: ----------------------------------------------------**
**
C Eval ObjNam = '???'
C Eval ObjLib = '*LIBL'
C Eval ObjTyp = '*PGM'
**
C CallP RtvObjD( RoData
C : %Size( RoData )
C : 'OBJD0100'
C : ObjNam + ObjLib
C : ObjTyp
C : ApiError
C )
**
C If AeBytAvl > *Zero And
C AeMsgId = 'CPF9801'
**-- Object doesn't exist...
C EndIf
**
C Return
**
Best regards,
Carsten Flensburg
----- Original Message -----
From: "Luis Martins" <lnmartins@xxxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, August 06, 2003 9:51 AM
Subject: QUSROBJD API
Can any one tell me how can use this API (QUSROBJD) to know if an object
exist ?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.