Skip to main content

Posts

Showing posts from February, 2020

READC & SFLNXTCHG

READC & SFLNXTCHG READC and SFLNXTCHG are the two popular keywords used when working with subfiles. This short post explains what is the use of these two keywords.  READC READC is used to Read the Changed Records in a Subfile. SFLNXTCHG SFLNXTCHG is used to mark the Records in a Subfile as Changed. SFLNXTCHG plays a Major role when there is a Subfile with Update capabilities. While processing the Subfile, Changed Records can be read using 'READC'. However, In most cases where Update is involved it is essential to validate the data before Update. Modified tag would be automatically turned off on a record when Program reads the Changed Record (using READC) for validation and wouldn't be able to read the record again for the actual UPDATE operation. This can be controlled using SFLNXTCHG Keyword. SFLNXTCHG can be used in two different ways. Use SFLNXTCHG Keyword without any indicator Control SFLNXTCHG Keyword with indicator.  Using SFLNXTCHG without any indicator would mar

Session or Device Error Occured

Session or Device Error Occured There are few scenarios where Subfile would crash with 'Session or Device Error Occured'. Below mentioned are the few scenarios when this issue would occur. Incorrect Record Number in SFLRCDNBR Variable associated with Keyword SFLRCDNBR (RRN) should be greater than Zero Displaying Empty Subfile No Records to display and still SFLDSP indicator is ON. Attempting to write more than 9999 records into Load All Subfile Maximum number of records allowed on Load All Subfile is 9999. Attempting to write more than 999 would result in Program crash.