can anybody help me that what is the procedure of debugging
the service program?

Answers were Sorted based on User's Feedback



can anybody help me that what is the procedure of debugging the service program?..

Answer / bharat

Hi Swadesh,

I hope u know, service program will always be binded and it
can't be called directly.
Now, to create a wrapper:
create one RPG Program in which service progrem is binded
as follows:
wrapper(test program) will have:
Define all the required fields in parameter list.
CALLB 'ABC' Parameter list;
and then create a module of it.
then create *PGM object of the same wrapper by using CRTPGM
+F4 and bind the service program 'ABC' with the module.
Now, to debug,

Strdbg SRVPGM(ABC)
add brak point
now call the Wrapper program.
------or -----------------------
Strdbg Wrapper program name
than F14 to work with module list
and add your service program(*SRVPGM) and add the break.
Call wrapper.

Is This Answer Correct ?    10 Yes 0 No

can anybody help me that what is the procedure of debugging the service program?..

Answer / bharat

Service program doesn't have any program entry procedure,
so can't be called directlty but it is binded with
reference to other program. So, we can debug it as follows:

Create a wrapper program calling the service program by
binding the service program that you want to debug and then
put that wrapper *PGM in debug and call it. This way we can
debug the service program.

Is This Answer Correct ?    1 Yes 0 No

can anybody help me that what is the procedure of debugging the service program?..

Answer / swadesh.yadav

Thanks Bharat. But i little bit confuse.suppose i have a
service program name ABC so how can i create a wrapper
program? can you explain it with example?

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

what are the types of identifers

2 Answers   IBM,


wat is curser?? and its types???

4 Answers   HSBC,


i'm working on progA , in that program i want to see the userids of the users who work on this program?

10 Answers   Four soft,


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


We have a Physical file, after reading 5 records,it has to read LF of that same Physical file,Will it start reading from Ist record or will start reading from 5th record?

5 Answers   Hexaware,






I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic

2 Answers  


Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


Can you copy the records created by the OPNQRYF to other files and how?

2 Answers  


can we use cl programming to update or delete physical files

12 Answers  


I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know how can i read the cusno = 1150 directly from PF in CL and RPG program(Without creating the LF and without reading the complete file and then compare 1150)

3 Answers   Opus,


what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?

4 Answers  


steps for debugging two rpg programs????

4 Answers  


Categories