Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get the number of rows returned by SELECT sql in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mpawankumar

New User


Joined: 26 Sep 2007
Posts: 7
Location: Chennai

PostPosted: Thu Dec 04, 2008 9:04 pm    Post subject: How to get the number of rows returned by SELECT sql in JCL
Reply with quote

How to get the number of rows returned by a SELECT sql in JCL. If the number of returned rows are zero i want to trigger the next job in the sequence. I am using ISPSTART command to run the query in QMF and storing the result in a PS.
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2296
Location: @my desk

PostPosted: Thu Dec 04, 2008 9:46 pm    Post subject:
Reply with quote

Select the count into a dataset
Check the dataset for count>0 using sort and return 0 or 4 accordingly
Run the successor job based on the above return code
Back to top
View user's profile Send private message
mpawankumar

New User


Joined: 26 Sep 2007
Posts: 7
Location: Chennai

PostPosted: Thu Dec 04, 2008 10:05 pm    Post subject: Reply to: How to get the number of rows returned by SELECT s
Reply with quote

Thanks Arun
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Can we combine the rows with same key... V S Amarendra Reddy DB2 12 Fri Dec 01, 2017 10:29 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us