program to find the number of objects used in a given
program through a display.
Answer Posted / 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 View All Answers
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.
what is a rpg?
how can I tell when to replace the array?
How many program bind in one module....
what is an online rpg?
What is a record lock error?
are there any useful c runtime apis that I can call from rpg iv?
what is *place and *auto keyword in prtf ?plz explain
what do you mean by an input subfile, what are the keywords required?
what are the key words you must use when using a subfile?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
what is kids-rpg?
What is file identifier where we can use?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
how can you display specific subfile page on the screen in unequal subfile?