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 |
Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.
1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST IF %ERROR can any body find the wrong please? 2.What builtin function will you use to achieve the following functionality? C QTY IFLT *ZERO C QTY MULT-1 QTY ENDIF
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?
in which journalling which attributes are necessary??/
I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?
HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?
what are the key words you must use when using a subfile?
Mr.Sidc sirfor my question{how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE} you have answered using MOVE opcode,can you illustrate me with a small example sir very kind of you.
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
Maximum how many files declare in rpgle
parameters cannot be passed in which one???