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 |
How Chain operation copies the record's data to the input buffer for the program?
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?
am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me
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
What you have to do in the display file when you are using message subfile?
how do u find whether a record is locked or not??
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?
If record-format name in an externally-described file has already been defined as a file-name.how to solve this?
program to find the number of objects used in a given program through a display.
How can we override a file during runtime in rpg?
What are the necessary keywords required to code a message subfile?