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 |
Hello, I want to extend a length of field in my Display file(Subfile). Please suggest the possible steps. Thanks
how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.
How to find d key field of a pf that doesn’t have source physical file?
1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?
How to create a key field for a logical file inside RPG?
1..Write an sql query to find the employee name who is having 2 phone numebr? 2.Write an sql query to the the second highest salary of the employee?
suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis
Errors in Sql query will be in which state?
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?
Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.
i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.
How to read a record from file where there is multiple record occurrence is available?