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 |
Suppose i am having 3 programs PgmA,pgmB,pgmC and using source debugger. At debugging time i found that pgmC having some code error..then in debug mode directly how can i debug pgmC
Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?
what is kids-rpg?
I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.
In how many ways a session/device error occurs,,, and what is the remedy for it?
1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAIN D:READP 2.How to pass numeric parameter to the rpg pgm from the command line? 3.What keyword is used on the rpg 4 definition specification to rename a subfile in an externally definition data structure? A:RENAME B;LIKE C:EXTNAME D:EXTFLD
how can i retrieve the field name from display file at run time? Devendra Singh Tomar
how to display all the members records in a physical file without using ovrdbf?
I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.
what is decimal data error? when it will come and how to achieve(rectify) this error please give me solution as well as code
can anyone say,what is the use of operation extended H/N/P?
How can a screen field that has changed since the last output operation be detected?