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 |
What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.
Can anybody tell me that why we use option(*nodebugio)in H- Spec?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
what is the necessary keyword needed to scroll subfile records?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
what is file information data structure?
How to handle duplicate error handling in RPG?
What would be the effect on the field where reverse image, underline and high intensity?
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
How to declare the dynamic(run time) array in rpgle? can you please give example
how can an indexed file be used as arrival sequence in RPG?
How can we search particular records from the database file in RPG. For example, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular 'NAME' field. How can we do the above using SEARCH criteria other than using the IF cond?