MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

passing date and time parameter to SQL in JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Tue Mar 06, 2007 2:53 am    Post subject: passing date and time parameter to SQL in JCL Reply with quote

Hi All,

I have 2 problems here. I need to write a sql in run in which I need to :

- Pass the date as a parameter.
- capture the count ( Num of rows fetched) from the SQL and based on the rows I need to FTP the file.

Here's an example.

Select * from table 1
where date = current date

Is it possible to capture the count from the SQL and ste MAXCC based on the count.

Say if the count > 100 set maxcc=8

Please let me know ..

Thanks,
Mt
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Mar 06, 2007 3:54 am    Post subject: Reply with quote

What we do is:
In the morning run a job which sets the date for the processing day. This is stored in a file.
Any job for that processing date reads that file to get the date. doesn't matter tehn if it runs before or after midnight.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Tue Mar 06, 2007 6:23 am    Post subject: Reply with quote

Martin,

1. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=6626&highlight=date

2. Unload the data and run it thru Idcams/sort to set the return code. Check this forum for examples

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group