CPD5D02 error on the binding step
Last Post 15 Jul 2010 01:41 PM by Rick Johnson. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Rick Johnson
Basic Member
Basic Member
Posts:72

--
14 Jul 2010 06:02 PM
I am trying to help a developer troubleshoot a CPD5D02 on an RPGLE program compile that uses a new procedure from a service program. I am not an ILE expert, so I am going off only what I can see. The new module is called GETCCTOKEN and when I display the service program I see the module listed, but I don't see the procedure (called B#UTL_GETCCTOKEN) listed under Procedure Exports like I do for other modules shown in the same service program. I am sure that I am probably not providing anywhere near enough information, but I thought I'd start with the general. We have checked for typos, library list issue, etc. My questions are A) could this cause a CPD5D02 on the program compile at the binding step 2) and if yes, how do you correct the missing Procedure Export entry? Thanks RJ
Scott Klement
Editorial Staff Member
Editorial Staff Member
Posts:16395
Avatar

--
14 Jul 2010 06:04 PM Accepted Answer
This sounds so obvious that I'm hesitant to say it, but... Did you remember to export the procedure from the module? (in RPG, you do that with the EXPORT P-spec keyword) Did you remember to export the procedure from the service program? (That's done with binder language.)
Rick Johnson
Basic Member
Basic Member
Posts:72

--
14 Jul 2010 06:19 PM Accepted Answer
In the module source, I do see he used the EXPORT keyword used on the P-Spec.
0001.00 strpgmexp pgmlvl(*current)              
0002.00          export symbol(B#UTL_MsgRtv   ) 
0003.00          export symbol(B#UTL_MsgParse ) 
0004.00          export symbol(B#UTL_RtvMsg)    
0005.00          export symbol(B#UTL_STMFClose) 
...
0069.00          export symbol(B#UTL_RUNSQLSTMT)  
0069.01          export symbol(B#UTL_GetCCToken)  
0070.00 endpgmexp                                 
0071.00            
Hopefully I am giving you right info. RJ
Rory Hewitt
Veteran Member
Veteran Member
Posts:1311
Avatar

--
14 Jul 2010 06:22 PM Accepted Answer
RJ, Are you sure the *SRVPGM was created using that binder source? Rory
Rick Johnson
Basic Member
Basic Member
Posts:72

--
14 Jul 2010 06:29 PM Accepted Answer
Rory, Unfortunately no, I am coming into this without a lot of background. Let me check and see when the service program was created. (or re-created) Scott, Sometimes the painfully obvious is the answer and I'm in a learning mode here. The developer claims it has to be something simple but he just can't seem to find it. Any suggestions are worthwhile at this point. :) thanks. RJ
Rick Johnson
Basic Member
Basic Member
Posts:72

--
14 Jul 2010 06:38 PM Accepted Answer
I am told the service program was recreated - multiple times. RJ
Craig R. Lockhart
Veteran Member
Veteran Member
Posts:1167
Avatar

--
14 Jul 2010 08:17 PM Accepted Answer
If the procedure is not listed in the "procedure exports" (via command dspsrvpgm), then there is probably a disconnect between the service program creation and the binder source. Example procedure export screen (using an IBM service program as en example so you can see the same thing):
CRTSRVPGM SRVPGM(MYLIB/YADAYADA)            
MODULE(MOD1 MOD2 MOD3)                      
SRCFILE(MYLIB/SOURCEFILE) SRCMBR(BINDSOURCE)
I am thinking that if you specify an export procedure in the binder source and it does not exist, the service program will not compile. However, I do not have time at present to experiment to prove that. So, playing devil's advocate: Make sure that the module that the procedure is in is current (aka compiled after the procedure was added). Also make sure that module is included in the module list list during the service program compile. I hope that this helps and have fun :cool:
Rick Johnson
Basic Member
Basic Member
Posts:72

--
15 Jul 2010 01:41 PM Accepted Answer
Craig, Thanks - I did some checking and did a RTVBNDSRC to see what might be happening. The source didn't have the GETCCTOKEN. In a different library I was able to create the service program and binding directory and the got both the module and procedure export to show correctly. The program compiles successfully with the right library list for this service program. So I am going to send this back to the developer and have him make sure that he's getting successful creation of the service program and the binding directory. I still can't figure out how the version he was using was missing the procedure export entry since everything on the module appeared to be correct. Thanks to all for the help. RJ
You are not authorized to post a reply.

Acceptable Use Policy