if i have three programs progA,progB and progC .now i call
progB from progA. but the progB does not exist . now i want
to call progC instead of starting dump. how can we achieve
this.

Answers were Sorted based on User's Feedback



if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / shantanu kumar dutta

Dear,

You can handle like that .check an object existance by
CHKOBJ like, If Object dose not exist than it through
MonMsg CPF9801,CPF9810 by this we can handle the
situations.

Eq->

CHKOBJ OBJ(&FLTLIBNM/PgmB) OBJTYPE(*PGM)
MONMSG MSGID(CPF9801 CPF9810) EXEC(GOTO CMDLBL(Call
PgmC))

Is This Answer Correct ?    20 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / sreedhar

We can use Monitor and ON-Error opcodes to do the same.

Is This Answer Correct ?    4 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / vinod babu

I m not sure about this answer. But my idea is dat we can
use ERROR HANDLING in main program. Suppose if the main pgm
does not exist then error routine will be handled and the
control passed to next statement after that routine.

Is This Answer Correct ?    3 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / raja

By Using *pssr we can handle the error and take dump of
that.

For Example:

call 'Nxtpgm'(if object is not Found it take
Nxt tag dump and call the nxtpgm1)
Call 'Nxtpgm1'


*pssr Begsr
Dump(A)
Goto Nxt
Endsr

seton lr

Is This Answer Correct ?    3 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / cagatay azkin

In ILE environment, when you call programB, define call with
(E) and set the indicators (position 73 and 74 I guess)

Later on, use some %built-in functions such as $error and
%status to check.

If there is an error, you can take an action in*PSSR error
subroutine or by checking the indicator in calc spec to
whatever you want.(in this case, you need to define it in INFSR)

For more detail, you can refer ibm's ile rpg reference book.

Is This Answer Correct ?    3 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / bhupendra tomar

just use 2 cmds
CHKOBJ and handle error through
MONMSG msg(CPF9801)

Is This Answer Correct ?    1 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / ali

in dump routine call actual pgm

Is This Answer Correct ?    1 Yes 1 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / raja

For Example:

call 'Nxtpgm'(if object is not Found it take
Nxt tag dump and call the nxtpgm1)
Call 'Nxtpgm1'

seton lr

*pssr Begsr
Dump(A)
Goto Nxt
Endsr

Is This Answer Correct ?    0 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / cage

why don't you check the HI indicator?

Is This Answer Correct ?    0 Yes 0 No

if i have three programs progA,progB and progC .now i call progB from progA. but the progB does no..

Answer / ali

only one option to use checkobj after call command

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

How Chain operation copies the record's data to the input buffer for the program?

0 Answers   IBM,


What is the difference between ITER and DO ? I know both are used to execute set of statements repeatedly, but what is the main difference?

2 Answers   CGI, Wipro,


am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me

1 Answers  


how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE

3 Answers   iGate,


What you have to do in the display file when you are using message subfile?

1 Answers  






how do u find whether a record is locked or not??

4 Answers   CTS,


what is the procedure and explain about real time scenario.

0 Answers   Adhoc Technologies, Hanuman Automation, HSBC, IBM,


What is the purpose of record level identifier?

0 Answers  


If record-format name in an externally-described file has already been defined as a file-name.how to solve this?

2 Answers   CTS,


program to find the number of objects used in a given program through a display.

2 Answers   IBM,


How can we override a file during runtime in rpg?

0 Answers  


What are the necessary keywords required to code a message subfile?

3 Answers  


Categories