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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain mdt?

665


What is difference between bind by copy and bind by reference?

1730


We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

768


how can I tell when to replace the array?

702


What are the types of identifiers?

570






How many program bind in one module....

2121


are there any useful c runtime apis that I can call from rpg iv?

700


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1895


what is the difference between do while and do until?

703


what is the necessary keyword needed to scroll subfile records?

702


what do you mean by an input subfile, what are the keywords required?

773


what is a rpg?

701


What is file identifier where we can use?

652


How to call one program from another program in RPG? please help me with the code

1260


can I touch the array during treatments?

756