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



The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / harshad

Update LDA with PGMA & retrieve the same in PGMB for
printing.

Is This Answer Correct ?    6 Yes 0 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

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

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

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

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

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

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

Answer / sreedhar reddy

Retrieve Call Stack (QWVRCSTK) API will do it.

Is This Answer Correct ?    0 Yes 0 No

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA..

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

Post New Answer

More RPG400 Interview Questions

difference between CHAIN and READE?

8 Answers   HCL,


How to update selected fields from pf without using update opcode. How to read all member in Rpg-3,without using any cl command?

8 Answers  


i want to retrieve record b/w 2 dates in as400

2 Answers   L&T,


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

0 Answers   IBM,


what is plat file?

6 Answers   Indian Infotech,






Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


RETRIVING DELETED RECORDS :- I'm frequently asked how to retrieve deleted records from an unjournaled physical file when the deleted records have not yet been removed from the file. Utility UNDEL lets you undelete records in a physical file. This public domain program is available in CISC and RISC versions, and the complete source code is available for download at: UNDEL for AS/400 Save File (RISC): http://www.as400network.com/sharewarefiles/undelris.zip UNDEL for AS/400 Save File (CISC): http://www.as400network.com/sharewarefiles/undel.zip UNDEL for AS/400 Save File (Source code): http://www.as400network.com/sharewarefiles/undelsrc.zip The utility takes advantage of the fact that deleted records in physical files are only flagged as deleted, and the record data still exists until it is overwritten or the file is reorganized with a utility such as RGZPFM. UNDEL simply reads the deleted record, then reuses the record by writing over it with the new record (thus eliminating the flag for the deleted record). Some homegrown and commercial utilities copy the file containing undeleted records to a save file, then use a program to read the save file, which contains live and undeleted records, to a file to undelete the records. The UNDEL utility is superior to the SAVF technique because there's no need to copy the file to a save file, which is especially important for really large files. When run, UNDEL displays the physical file records in their unformatted, raw text form. You can either position the display to a given relative record number or use F19 or F20 to find the previous and next deleted record, respectively. The utility also includes online help, which is almost unheard of for free utilities. Other utilities include the ability to undelete records. You can use the RTVDLTRCD command in the old QUSRTOOL (no longer supported by IBM). QUSRTOOL is now a commercial product called TAA Productivity Tools ( http://www.taatool.com ). The free file editor WRKDBF has a built-in undelete capability ( http://www.wrkdbf.com ), and several commercial file editors can undelete records. For a complete list of file editors, go to http://www.sourcebook400.com, select "Programmer Tools" under "Product Category," then select "File Editors."

0 Answers  


i want code and what are used key words are ...like wrkmbrpdm screen (q) i have a file with 3 fields empno,empname,empaddr... here you give the empno it displays from that number to remaining empno's how? sub file screen: employee details pos to:empno then enter empno empname empaddr so file have 100 records from 1 to 100 so the above pos you give the 55 empno...it displays the from 55 to remaining... ...... please share this answel

2 Answers   IBM,


how do u track msg in cl pgm???

1 Answers   CTS,


You have a *USE authority on a Library and *All authority on a file in that Library.Can you change the data in that file?

1 Answers  


1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS

3 Answers   IBM,


When will DUMP & DEBUG be ignored?

3 Answers   IBM,


Categories