Set On LR Vs Return

169 views
Skip to first unread message

Nisha Ramesh

unread,
Jun 27, 2011, 2:19:24 AM6/27/11
to as400-interview-experts
Hi,

Am not trying to ask the normal question about the difference between
those, but i wanted to know If I have used SetOn Lr say at the
beginning of my program, and the control comes to the calling program
after executing a Return statement. In this case, will the open file
will get closed?

Regards
Nisha

Neeraj Kumar

unread,
Jun 27, 2011, 9:00:34 AM6/27/11
to as400-inter...@googlegroups.com
Do WRKJOB after your return command,
The you can see the list of open files using option 14, there u will be able to see if the file still open or not!!!
(for use take one file which is declared only in your program where u use return after *inlr=*on.)
To my knowledge it gets closed, but never experimented this way :-)
You are trying lot many new things these days, i highly appreciate!
Please update me too...

Nisha Ramesh

unread,
Jun 28, 2011, 7:56:54 AM6/28/11
to as400-inter...@googlegroups.com
Hi Neeraj,

I tried, You are right...the file got closed after the return.

Thanks
Nisha

Razuk

unread,
Jul 4, 2011, 2:35:37 PM7/4/11
to as400-inter...@googlegroups.com
Hi,

 Try with embedded SQL. 
 Do any SQL operation inside the program. And then test with SETON LR & Return, whatever you like. 
 Please share me the result :) after the program ended. 
--
Warm Regards,
Razuk.
Reply all
Reply to author
Forward
0 new messages