
Or you could create 1 subfile record with the message “No Records exist” in the first text field.
Phil

set indicator in subfile display, subfile display control..
eval *in35=*on -> ON subfile display control indicator
exfmt subctl -> subfile control record format name
and switch off subfile display and subfile display control indicator
after you getting empty subfile….

thanx every1.deepu and sathish that exactly is the answer i was looking for.

what exactly is the scenario if we use MONMSG to capture the error. is it possible??

You cannot have the MONMSG Command in RPGLE.
Why would you like to use MONMSG, Main use of having MONMSG is for error handling.
You can follow the above suggested procedure for avoiding the Program Crash.
If Records > 0 ;
Switch Display & Display Control Indicators
Else
Switch Display Control Indicator Only
EndIF
Write Control Format
Pradeep.

use MONMSG to capture the error. is it possible??
Possible, yes (monitor message is a CL process but there are RPG ways to capture errors/exceptions) that might work in this case, however, these seem totally inappropriate. The program has to compute the subfile RRN to write subfile records so it a staight forward process to use Pradeep recommendion. Pradeep’s recommendation it is the standard practice for handling this case.
Phil

Firstly.. during CLRSFL : eval dspctl = *off
eval clear = *on
write sflctl
eval dspctl =*on
eval clear = *off
after reading PF:
Only switch on SFLDSP if RRN > 0
in else do as
Philpl1jb suggested .

rebekahalkhalifa@yahoo.com
Hello…
I wish you best Compliment of the season,with hope that you are physically and healthly alright,l do believe that this mail will reach in good condition. My name is Rebekah i saw your profile in www.itknowledgeexchange.techtarget.com and admire it, i think we can make it together, please i would like you to contact me through my email address:( rebekahalkhalifa@yahoo.com ) i will tell you more about myself, also send you my photo,as soon as you contact me back, hopping for your lovely reply soonest,
Rebekah….
















