program to find the number of objects used in a given
program through a display.
Answers were Sorted based on User's Feedback
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 |
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 |
what is the difference between the cpyf command crtdupobj command?
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 overlay? how can we pass parameters in cl or rpg programing? how can we get data area value in cl or rpg programming?
I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.
HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....
A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?
what is decimal data error? when it will come and how to achieve(rectify) this error please give me solution as well as code
We have a Physical file, after reading 5 records,it has to read LF of that same Physical file,Will it start reading from Ist record or will start reading from 5th record?
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
What you have to do in the display file when you are using message subfile?
How to declare the dynamic(run time) array in rpgle? can you please give example
How do you do indexing in a physical file?