Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

EZT -> get weekday from system date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Wed Mar 21, 2007 8:13 am    Post subject: EZT -> get weekday from system date
Reply with quote

i want to get week day or week number from a system date in MM/DD/YY format thru easytrieve. Please let me know ASAP if any one has any idea about it.
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Mar 21, 2007 10:29 am    Post subject:
Reply with quote

Hi Gprerna,

You can use following query in your ezt pgm

Code:
SELECT WEEK( CURRENT DATE)
FROM SYSIBM.SYSDUMMY1;
Back to top
View user's profile Send private message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Thu Mar 22, 2007 3:13 am    Post subject:
Reply with quote

can we code SQL's in a ezt?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2007 3:41 am    Post subject:
Reply with quote

Hello,

Yes, if your shop has DB2 and you have access to it.
Back to top
View user's profile Send private message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Thu Mar 22, 2007 3:43 am    Post subject:
Reply with quote

Can we convert system date into week day or week number without using SQL?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2007 3:46 am    Post subject:
Reply with quote

Hello,

You could write code to do this . . . Instead, i'd suggest you talk with others at your location and see if there is already a callable module you could use.

If you have this requirement, others have most likely had to do the same thing previously.
Back to top
View user's profile Send private message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Thu Mar 22, 2007 3:49 am    Post subject:
Reply with quote

No we dont have access to it icon_sad.gif
Do you have any idea how i can do it?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Mar 22, 2007 4:18 am    Post subject:
Reply with quote

gprerna wrote:
No we dont have access to it
What is "it"?
gprerna wrote:
Do you have any idea how i can do it?
Find out what the base data is and use that information to create the "modulus" you need.
Back to top
View user's profile Send private message
gprerna

New User


Joined: 21 Mar 2007
Posts: 38
Location: US

PostPosted: Thu Mar 22, 2007 4:45 am    Post subject:
Reply with quote

I mean, how can i convert date to week day or a week number with using SQL.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2007 6:12 am    Post subject:
Reply with quote

Hello,

You can get the "week" or the "dayofweek" (or a whole bunch of other date/time values) using the suggestion Ekta posted in response to your original query.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us