1) How to declare a file?
2) How to define a display file?
3) How to monitor error messages in RPG?
4) How to find the attributes for subfiles? and what is the
DDS for subfiles?
Answers were Sorted based on User's Feedback
Answer / mehul
Answer to 3)
Method 1:
To moniter Error in RPG make use of
MONITIOR
.....
ON-ERROR <some error number>
ENDMON
u can place a subroutine , procedure etc under this to
handle the error for the following
Method 2:
Activate the Error Indicator, for the field you want to
place the error handling
if any error occurs for that field %error is SETON, and u
can use this indicator to take action accordingly
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / madhu
1Ans).DCL VAR(&A) TYPE(*DEC) VALUE(54)
2ans). DCLF FILE(LIBNAME/FILENAME) RCDFMT(SCREEN NAME)
3Ans.) In FREE FORMAT WE ARE USING MONITOR AND END-MON,THE
CODE LIKE MONITOR;
--------
ON-ERROR(FILE NAME/PGM NAME);
---------
END-MON;
AND ALSO IN RPG/400 WE ARE USING *PSSR SUBROTEN WE CAN TRAP
THE ERRORS
AND ALSO WE R USING FILE INFORMATION DATASTRCTERS, PROGRAM
STATUS DATA STRUCTERS WE CAN TRAP THE ERRORS
4Ans)in subfile we can find out varibles and varibles
lengths in subfile record format key word.
| Is This Answer Correct ? | 1 Yes | 1 No |
Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?
How can we receive values from a called procedure in RPG?
A pgm subroutine calling child subroutine, that child subroutine again calling parent subroutine, u have 1000 lines of code, with out debugging , how can u find that error??? Is there any command to find errors in pgm???
what is post opcode do
wat is the difference between array and multiple occurence data structure?
we hav job which is running as batch. it takes atleast 06hours to complete tht job. bu i wana do tht job with in 3hours.........? so plz post ur answers
Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any
what is the rpg system?
Suppose we have 10 records with same name and we are reading using READE,after 4 record i have to use CHAIN what is the output
how do I play {insert rpg system here}?
what is the necessary keyword needed to scroll subfile records?
1.what are the ARITHMETIC EXPRESSIONS IN CL PGM? 2.How to PASSING PARAMETER TO CL PGM?