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 |
i want to retrieve record b/w 2 dates in as400
we are sending data of physical file to screen design and it is showing no record why?
What would be the effect on the field where reverse image, underline and high intensity?
what is the difference between do while and do until?
what is plat file?
How do you find whether a record is locked or not?
How to change the name of physical members Dynamically?
How do I link an existing logical file to it's Physical File without recompiling?
How to create a key field for a logical file inside RPG?
check existence of one record without using chain or read?
1.I Have a physical file , i want to read the data from the each and every member of the File in the CL Program.How do you achieve this. 2.How do you do the same in RPG?. do think is it possible to read data from all the members in the RPG?
Need a sql query: retrieve all duplicate records in table?