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

1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?

4 Answers   Virtusa,


HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

2 Answers  


1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS

3 Answers   IBM,


How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

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,






Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?

1 Answers  


can anybody explain significance of *loval setll with example code????

3 Answers   HSBC,


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,


How to print Superscript / Subscript from RPG400

1 Answers  


How do you code file / field renames in ILE RPG?

4 Answers   Accenture, IBM,


How do you call procedures in ILE?

3 Answers  


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

2 Answers  


Categories