Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


program to find the number of objects used in a given
program through a display.

Answers were Sorted based on User's Feedback



program to find the number of objects used in a given program through a display. ..

Answer / divakar

Instead you can do DSPPGMREF to *OUTFILE and read that
outfile in RPGLE program where Copying spoolfile to flat
file and reading flat file based on positions may cause
confusion and may cause to get incorrect values.

Is This Answer Correct ?    5 Yes 0 No

program to find the number of objects used in a given program through a display. ..

Answer / harshad r suryawaunshi

The main thing in this program would be commanf DSPPGMREF

* Creat a display file to enter program name with length 10
* execute command either calling another CL program or
through QCMDEXC in the same RPG.
DSPPGMREF PGM(XXXXXXXX) OUTPUT(*PRINT) OBJTYPE(*PGM)
This command willl generate spool file named QPDSPPGM

* Copy this spool file in a flat file with CPYSPLF command.
Again you can do it through CL or in the same RPG with
QCMDEXC

CPYSPLF FILE(QPDSPPGM) TOFILE(XXXXXX) SPLNBR(*LAST)

* from line no. 16 objects used in the program start.
Object name can be found from position 55. Read the file in
which spool file is copied. set a condition

C read XXXXXX
C
C dow not %eof(XXXXXX)
C eval Heading=%subst(XXXXXX:5:6)
C if status='Object'
C eval Objectnm=%subst(XXXXXX:55:10)
C Dsply bBJECTNM
C read XXXXXX
C Enddo

Heading is program defineed variable with character and
length 6.

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More RPG400 Interview Questions

Can we have a Physical file without any member ? Please let me know

12 Answers  


Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


1.What is referential Integrity? 2.What is Foreign Key? 3.What is Transfer Control? 4.What is Free format?

3 Answers  


what are the array operations?

1 Answers   IBM,


how does the rpg element work?

0 Answers   IBM,


how do u find whether a record is locked or not??

4 Answers   CTS,


can anyone say,what is the use of operation extended H/N/P?

2 Answers  


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  


Suppose we add one field in physical file and this physical file is used by several programs.how do we know which program is using that file? What are the impact analysis.

6 Answers  


do you use message subfiles? What are the necessary keywords required coding a message subfile?

0 Answers   IBM,


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

2 Answers   L&T,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


Categories