KB Article 14995

Contact Tech Support

 Email Tech Support
 (250) 655-1766
 [7:30 - 5:00 PST]
Your Meeting ID will be Provided by a Rep.
Tech Support
Tech Support Home
Software Updates
Knowledge Base Search
Recent KB Articles
Product FAQs
Code Samples
Tech Blog
System Requirements
Installation Instructions
Support Testimonials
Contact us to...
Create a Ticket
Request a Free Demo
Suggest a New Feature
Submit Feedback
Upload a Large File
Other Services
Software Training
Professional Services

Using SQLEXEC to filter records in your ProGen Plus subfile program.

Product: ProGen Plus Type: How to

The customer was trying to limit records displayed in a subfile by checking for a hit on a logical of his definition's primary file. This logical had select/omit criteria that allowed him to easily check for the records that he wanted, but doing a GETRCD to the file changed his file pointer and affected the rolling of his subfile.

We changed his code to use a SQLEXEC instead of a GETRCD at the context *FILT. The SQL we used was:

select count(*) into :num_recs from file where keyfield = :keyfield

Then we created an IF statement that tested if there were any records that matched:

IF (num_recs > *ZEROS)
  updfld *RS01 = 0

Give us a call if you have any questions!

Rate This Article

Did this example help you to achieve your goal?
 Yes  No  Don't Know

Enter additional comments below.   If you want to hear back from us, include your contact information.

Email Address:
Please enable JavaScript in order to rate this page.