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: 2285
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 Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

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