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 MONMSG IDENTIFIER FOR STRTCPFTP command IN cl (as/400)?

3 Answers  


How to print output from openquery in as400 ?

1 Answers   Four soft,


Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?

3 Answers   IBM,


what is the difference between SETON RT & RETURN?

5 Answers  


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  






1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?

3 Answers   HSBC,


what is flat file?

1 Answers   IBM,


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

0 Answers  


What is the difference Return and InLr?

3 Answers  


What is journalling and commitment control?

3 Answers   IBM,


I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic

2 Answers  


If I have a file with 5 record and that file has 2 Key field and I want to read the unique record of the file then how can we achieve it?

1 Answers  


Categories