Author: daveporcelan
Posted: Tue Mar 14, 2017 12:18 am (GMT 5.5)
One way to approach this:
1) Add FETCH FIRST 2 ROWS ONLY to your sql
2) Write the results (data) to a dataset (in your JCL)
3) Process the above dataset using product of your choice (SORT, IDCAMS, REXX), setting the rcode accordingly. This would vary for 0, 1, or 2 rows found.
Posted: Tue Mar 14, 2017 12:18 am (GMT 5.5)
One way to approach this:
1) Add FETCH FIRST 2 ROWS ONLY to your sql
2) Write the results (data) to a dataset (in your JCL)
3) Process the above dataset using product of your choice (SORT, IDCAMS, REXX), setting the rcode accordingly. This would vary for 0, 1, or 2 rows found.