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
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 |
Answer / sreedhar
We can use Monitor and ON-Error opcodes to do the same.
Is This Answer Correct ? | 4 Yes | 0 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 |
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 |
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 |
Answer / bhupendra tomar
just use 2 cmds
CHKOBJ and handle error through
MONMSG msg(CPF9801)
Is This Answer Correct ? | 1 Yes | 0 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 |
What is the name of default out queue when user logs inn to syatem with valid profile?
What would be the result on writing a data record to a PF file using the "WRITE" opcode after the SETON *ON *INLR statment?
Can any one plz explain the concept of INFSR, *PSSR, INFDS AND PSDS, I' confusing about PSDS and *PSSR, Wat is the difference btw them, wat PSDS will do????
I have a Physical File name 'File1', which is present in two libraries named 'LIB1' & 'LIB2'. These 2 libraries are listed in the library list. Would like to access data from this file from these two libraries using RPG program. How to do this, any idea?
in which journalling which attributes are necessary
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
what is the necessary command needed before OPNQRYF and why?
Can anybody tell me that why we use option(*nodebugio)in H- Spec?
wat is the difference between dataarea and data queue?
5 Answers Airtel, Four soft, Shahi Exports,
A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?
how do I do concatenation in rpg iv, like I do in cl?
why we do STRSRVJOB in batch debugging in as400