Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 ?    19 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 ?    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 / 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 ?    2 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 ?    2 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 ?    2 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

Hi all friend, Could Any body send me the code (with coding) of this senario because I have tried but I am stucking somewhere so Please reply ASAp with coding. senario:Q: I have to write the flat file(FLAT1) into the three different PFS (PF1,PF2 and PF3) with the respect of H line data, D line data and Z line data of flat file. where I have different data in flat file(FLAT1) which is mentioned below with data. H0929200909282009092820095529420003000073 D2222220006765555webservi001633.9909222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840001633.99001633.99851856492689800208001915 511001633.990408490000000.0000000003446048 1,3 110793145 09070700351 372367 Rosner Motors D3333320006774444webservi000271.2409222009092820090924200951 8564380134049ROSNER TOYOTA OF FREDE FREDERICKSBURVA 224080000USA840840000271.24000271.24851856492689800208001835 511000271.240930680000000.0000000003450293 1 110793254 09072100079 373933 Rosner Motors Z0929200900000020001905.25 FLAT1 has the three pf data H line-represents the header pf data,D-Represent Details pf data,Z-Represents the trailer pf data Now I have to write H line data of flat file into Header pf (PF1),D line data of flat into datails pf(PF2) and Z line data of flat file into pf(PF3) with the spefic position(H,D and Z data of flat file into PF1, PF2 and PF3) of flat file.

4 Answers   IBM,


What is the RPG cycle?

3 Answers   CSC,


what is the procedure and explain about real time scenario.

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


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


What is the purpose of record level identifier?

0 Answers  






what are the parameters of jobd?give in detail.&what are the parameters of subsystem...????

1 Answers   CTS,


can I touch the array during treatments?

0 Answers   IBM,


Difference between creating a report using Printer file and WRKQRY(Query Report) ?

3 Answers  


Hi,Please give me complete code with this logic. The question is how to read the records from a file with load an array of size with error condition? (The logic is Z-Add 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN9 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO)please give me complete code with explanation?

1 Answers  


How to call one program from another program in RPG? please help me with the code

0 Answers   HCL,


Write a program to display prime numbers between 1 to 100 using RPGLE.

1 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,






Categories