Searching records in a subfile on COBOL ILE

45 pts.
Tags:
AS/400 cobol subfile
Hi all, I' just new in learning COBOL with subfiles. My COBOL program can display records in subfile but I wanted to search the name within the subfile records. Can someone post a sample code or can help me with my problem. Below is the screen looks like:
SEARCH: _______ (to search the name in the subfile)
option    ID    NAME
------------------------
_99xxxxxxxxx
_99xxxxxxxxx
_99xxxxxxxxx 


Your help means a lot to me...Thanks!


Software/Hardware used:
software

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne
    Assuming your SFL is not the complete set of data from the file because you are using the page keys to get more information; It is a little more complex that just searching the SFL.
    I would recommend the you use SQL to populate the SFL when using the search capability.
    You can use the LIKE '%xxx%' function in SQL to retrieve the records and fill the SFL.
    41,370 pointsBadges:
    report
  • Radycal
    i even moved the value of search-field to my keyed file and successfully located the record and write again in the subfile. but upon displaying still displaying the 1st record. how can i make my search-field be the 1st record on my subfile.  
    45 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following