NOTICE: Our Community is moving. Get more information.
So if they actually had a program called "prog2" in the "prog2.dll" it would load the .dll and set pp to a non-null value.Since the entry point name that they wish to call is different than the name of the .dll then in order to test if it loaded successfully they would have to do:
set pp to entry "prog2"if pp = null set pp to entry "subprog" if pp = null display " load error" else display "loaded" call "subprog" end-ifelse display "loaded" call "subprog"end-if.
Another option is to add a dummy COBOL program that had the same name as the .dll to the .dll.
identification division.program-id. prog2.procedure division. goback.Then when the statement:
set pp to entry "prog2"is executed it will call the dummy program and pp will be set to non-null so it will pass the not null test.