The PGMA calls PGMB.PGMB generates a report.The report
should contain the called program name(PGMA).How do i get
the called program name in PGMB to print it on the spool
file?(calling program name should NOT be hard coded or
passed as parameter to called program?

Answers were Sorted based on User's Feedback



The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / harshad

Update LDA with PGMA & retrieve the same in PGMB for
printing.

Is This Answer Correct ?    6 Yes 0 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / swetha p rao

There is an API QWVRCSTK to find out the called program name
If we pass required parameters to the API we can find out
called program name.

Is This Answer Correct ?    4 Yes 0 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / ld123q44

Use a data area. Just before calling Pgm B stick Pgm A name
in the data area. Then when you are in Pgm B examine that
data area and get the value loaded in Pgm A.

Is This Answer Correct ?    3 Yes 1 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / syam

For RPG program use this in PGMB to get program name and
move to Print

I SDS
I *Program PGM

For ILE RPG

D SDS
D PGM *PROC

YOu will get program name in PGM

Is This Answer Correct ?    3 Yes 3 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / sreedhar reddy

Retrieve Call Stack (QWVRCSTK) API will do it.

Is This Answer Correct ?    0 Yes 0 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / renjith

When you call pgm B send a parameter also which contains
the name pgm A. so in report for the name of pgm A you can
move the parameter value.

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More RPG400 Interview Questions

What is the RPG cycle?

3 Answers   CSC,


What is ment by record level identifier?

0 Answers  


Delete FileName at first statement in RPG.

1 Answers  


How to read a record from file where there is multiple record occurrence is available?

1 Answers  


how do I declare a minor?

0 Answers   IBM,






how does the rpg element work?

0 Answers   IBM,


1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?

2 Answers   TCS,


i have 1000 records in pf.what are all the ways to read a particular name records in rpg?? ie.. in pf i have a name called demo appeared around 52 times hw will we read this particular records in rpg/400?.

11 Answers   IBM,


Some times While checking MSGW for object / member / record locks ,I have seen it's locked by itself ...? How it happen and what action we need to perform if job is updating / writing a record....?

6 Answers   HSBC,


what is difference between DSPFD and DSPFFD?please give me real senario with good example?

1 Answers  


please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?

4 Answers   HCL,


What is the purpose of Panel Groups?

4 Answers  


Categories