Q
Problem solve Get help with specific problems with your technologies, process and projects.

Working with records in an application

I'm working on an application. I can write 10 records only to an interactive subfile and then add them to physical file. I would like to load any records that are already in there also when the program starts and leave blank lines for the other records to be keyed in. I know this is probably pretty simple, but I'm having a lot of trouble out of it.

Set a work variable in your subfile so that you know if the record already exists, and you can skip edit checking for those records. If you are using read changed records, make sure to set the indicator so that the records you are writing are not considered as having changed.

Set the display attributes Protect (PR) and (UL) based on an indicator you turn on. This will keep the user from keying into those fields, and remove the underline from the input capable field on the screen. Load your subfile with records from the file and set the work variable and the indicator(s) as required. Once completed, clear the work variable and turn off the indicator. Set your subfile change indicator correctly and write your blank records. When processing, when you read the records in the subfile, you can either use READC for changed records or simply ignore the records with the work variable set.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Dig Deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close