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
Answer / harshad
Update LDA with PGMA & retrieve the same in PGMB for
printing.
| Is This Answer Correct ? | 6 Yes | 0 No |
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 |
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 |
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 |
Answer / sreedhar reddy
Retrieve Call Stack (QWVRCSTK) API will do it.
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
how can we can we the data decimal error?how can we open such file in support
Why there is invention of RPG if we can do insert update delete in CL through SQL.Why the rise of RPG?
if there is pf in two libraries and there is a logical file based on the PF, how to find the pf on which the pf is based.
what is the difference between the procedure and module in ILERPG?
How can i keyed a flat file in RPGLE
do you use message subfiles? What are the necessary keywords required coding a message subfile?
suppose one file is used by 100 user and file is locked by 100 user, what are the impact analysis?
How to sort an array in descending in RPG
Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes please help me by eloborating on that answer by writing a sample code for that sir
Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?