Last active
August 29, 2015 14:27
-
-
Save ibmiiste/c2f4d94f5837ac77ef3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* ==================================================================== | |
* Test existence objet | |
* ==================================================================== | |
PExists B | |
D PI 1N | |
D Obj 20A CONST | |
D ObjType 10A CONST | |
* | |
/COPY API_OBJ | |
D ObjL S 20A | |
D Objd DS likeDS(ObjD0100) | |
D ErrDS DS likeDS(ERRAPI) | |
/free | |
ObjL = Obj; | |
if %Subst( ObjL : 11 : 10) = *BLANK; | |
%Subst( ObjL : 11 : 10) = '*LIBL'; | |
endif; | |
RtvObj( Objd : %len(ObjD) : 'OBJD0100' : Objl : ObjType : ErrDS); | |
if ErrDS.ErrRtn > 0; | |
return *OFF; | |
endif; | |
return *ON; | |
/end-Free | |
PExists E |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment