IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

EZT -> get weekday from system date


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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: 1208
Location: Bangalore,India

PostPosted: Wed Mar 21, 2007 10:29 am
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Thu Mar 22, 2007 3:41 am
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
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

Moderator Emeritus


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

PostPosted: Thu Mar 22, 2007 3:46 am
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
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: 3156
Location: Tucson AZ

PostPosted: Thu Mar 22, 2007 4:18 am
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
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

Moderator Emeritus


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

PostPosted: Thu Mar 22, 2007 6:12 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts How to delete a user's alias from the... JCL & VSAM 11
Search our Forums:

Back to Top