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
 

 

I want Week end day in Easytrieve.

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

New User


Joined: 30 Aug 2005
Posts: 3

PostPosted: Sat Oct 01, 2005 10:55 am    Post subject: I want Week end day in Easytrieve.
Reply with quote

how to find out a weekend date in the easytrieve?

I found today date using sysdate.

for example today date is : 3rd october 2005.
then weekend date should be: 8th october 2005.(it should be saturday.)


in a report i want to print weekend date on one column.
Back to top
View user's profile Send private message

jon_s_rice

Active User


Joined: 24 Mar 2005
Posts: 102
Location: Douglasville, GA USA

PostPosted: Fri Oct 07, 2005 7:05 am    Post subject:
Reply with quote

Try this:
MONTH-TABLE W 180 A
MT-01 MONTH-TABLE 15 A VALUE '000317JANUARY '
MT-02 MONTH-TABLE +15 15 A VALUE '031288FEBRUARY '
MT-03 MONTH-TABLE +30 15 A VALUE '059315MARCH '
MT-04 MONTH-TABLE +45 15 A VALUE '090305APRIL '
MT-05 MONTH-TABLE +60 15 A VALUE '120313MAY '
MT-06 MONTH-TABLE +75 15 A VALUE '151304JUNE '
MT-07 MONTH-TABLE +90 15 A VALUE '181314JULY '
MT-08 MONTH-TABLE +105 15 A VALUE '212316AUGUST '
MT-09 MONTH-TABLE +120 15 A VALUE '243309SEPTEMBER'
MT-10 MONTH-TABLE +135 15 A VALUE '273317OCTOBER '
MT-11 MONTH-TABLE +150 15 A VALUE '304308NOVEMBER '
MT-12 MONTH-TABLE +165 15 A VALUE '334318DECEMBER '
SKIP 1
MONTH-ITEM MONTH-TABLE 15 A OCCURS 12 INDEX ZX-MO
MO-JUL-DIFF MONTH-ITEM 3 N
MO-NO-OF-DAYS MONTH-ITEM +3 2 N
MO-NAME-LENGTH MONTH-ITEM +5 1 N
MO-NAME-ALPHA MONTH-ITEM +6 9 A
SKIP 1
WS-SYS-DATE-ED W 10 A
WS-SYS-DATE-ED-MO WS-SYS-DATE-ED 2 A
WS-SYS-DATE-ED-DA WS-SYS-DATE-ED +3 2 A
WS-SYS-DATE-ED-CY WS-SYS-DATE-ED +6 4 A
SKIP 1
WS-DATE-WK W 56 A
WS-DATE-WK-CYMD WS-DATE-WK 8 A
WS-DATE-WK-CY WS-DATE-WK 4 A
WS-DATE-WK-CT WS-DATE-WK 2 N
WS-DATE-WK-YR WS-DATE-WK +2 2 N
WS-DATE-WK-MO WS-DATE-WK +4 2 A
WS-DATE-WK-DA WS-DATE-WK +6 2 A
WS-DATE-WK-CT-TIMES WS-DATE-WK +8 1 N
WS-DATE-WK-CT-REM WS-DATE-WK +9 1 N
WS-DATE-WK-YR-TIMES WS-DATE-WK +10 2 N
WS-DATE-WK-YR-REM WS-DATE-WK +12 1 N
WS-DATE-WK-SEQ WS-DATE-WK +13 6 N
WS-DATE-WK-SEQ-TIMES WS-DATE-WK +19 6 N
WS-DATE-WK-DAY-OF-WEEK WS-DATE-WK +25 1 N
WS-DATE-WK-DOW-TARGET WS-DATE-WK +26 1 N VALUE 6
WS-END-OF-WK-SEQ WS-DATE-WK +27 6 N
WS-END-OF-WK-SEQ-WK WS-DATE-WK +33 6 N
WS-END-OF-WK-SEQ-TIMES WS-DATE-WK +39 2 N
WS-END-OF-WK-SEQ-REM WS-DATE-WK +41 6 N
WS-END-OF-WK-ADJ WS-DATE-WK +47 1 N
WS-END-OF-WK-CYMD WS-DATE-WK +48 8 N
WS-END-OF-WK-CY WS-DATE-WK +48 4 N
WS-END-OF-WK-CT WS-DATE-WK +48 2 N
WS-END-OF-WK-YR WS-DATE-WK +50 2 N
WS-END-OF-WK-MO WS-DATE-WK +52 2 N
WS-END-OF-WK-DA WS-DATE-WK +54 2 N
JOB INPUT xxxxx START START-PROC
START-PROC. PROC
MOVE SYSDATE-LONG TO WS-SYS-DATE-ED
MOVE WS-SYS-DATE-ED-CY TO WS-DATE-WK-CY
MOVE WS-SYS-DATE-ED-MO TO WS-DATE-WK-MO
MOVE WS-SYS-DATE-ED-DA TO WS-DATE-WK-DA
CT-TIMES = WS-DATE-WK-CT / 4
CT-REM = WS-DATE-WK-CT - 4 * CT-TIMES
YR-TIMES = WS-DATE-WK-YR / 4
YR-REM = WS-DATE-WK-YR - 4 * YR-TIMES
WS-DATE-WK-SEQ = CT-TIMES * 146097 +
CT-REM * 36524 +
YR-TIMES * 1461 +
YR-REM * 365 +
MO-JUL-DIFF (WS-DATE-WK-MO) +
WS-DATE-WK-DA - 365
WS-DATE-WK-SEQ-TIMES = WS-DATE-WK-SEQ / 7
WS-DATE-WK-DAY-OF-WEEK =
WS-DATE-WK-SEQ - WS-DATE-WK-SEQ-TIMES * 7
* ---------------------------------------------------------------------*
* CALCULATE END OF WEEK |
* ---------------------------------------------------------------------*
WS-END-OF-WK-SEQ =
WS-DATE-WK-SEQ + WS-DATE-WK-DOW-TARGET - WS-DATE-WK-DAY-OF-WEEK
IF WS-DATE-WK-DAY-OF-WEEK GT WS-DATE-WK-DOW-TARGET
WS-END-OF-WK-SEQ = WS-END-OF-WK-SEQ + 7
END-IF
* CENTURY
WS-END-OF-WK-SEQ-TIMES = WS-END-OF-WK-SEQ-WK / 146097
WS-END-OF-WK-CT = WS-END-OF-WK-SEQ-TIMES * 4
WS-END-OF-WK-SEQ-WK =
WS-END-OF-WK-SEQ - 146097 * WS-END-OF-WK-SEQ-TIMES
*
WS-END-OF-WK-SEQ-TIMES = WS-END-OF-WK-SEQ-WK / 36524
WS-END-OF-WK-CT = WS-END-OF-WK-CT + WS-END-OF-WK-SEQ-TIMES
WS-END-OF-WK-SEQ-WK =
WS-END-OF-WK-SEQ-WK - 36524 * WS-END-OF-WK-SEQ-TIMES
WS-END-OF-WK-ADJ = WS-END-OF-WK-SEQ-TIMES
* YEAR
WS-END-OF-WK-SEQ-TIMES = WS-END-OF-WK-SEQ-WK / 1461
WS-END-OF-WK-YR = WS-END-OF-WK-SEQ-TIMES * 4
WS-END-OF-WK-SEQ-WK =
WS-END-OF-WK-SEQ-WK - 1461 * WS-END-OF-WK-SEQ-TIMES
*
WS-END-OF-WK-SEQ-TIMES = WS-END-OF-WK-SEQ-WK / 365
WS-END-OF-WK-YR = WS-END-OF-WK-YR + WS-END-OF-WK-SEQ-TIMES + 1
WS-END-OF-WK-SEQ-WK =
WS-END-OF-WK-SEQ-WK - 365 * WS-END-OF-WK-SEQ-TIMES
IF WS-END-OF-WK-YR > 0
WS-END-OF-WK-ADJ = WS-END-OF-WK-SEQ-TIMES
END-IF
* MONTH
IF WS-END-OF-WK-ADJ GT 0
OR WS-END-OF-WK-SEQ-WK LT 60
WS-END-OF-WK-ADJ = 0
ELSE
WS-END-OF-WK-ADJ = 1
END-IF
WS-END-OF-WK-MO = 12
DO WHILE MO-JUL-DIFF (WS-END-OF-WK-MO) GT
WS-END-OF-WK-SEQ-WK - WS-END-OF-WK-ADJ
WS-END-OF-WK-MO = WS-END-OF-WK-MO - 1
END-DO
* DAY
WS-END-OF-WK-DA =
WS-END-OF-WK-SEQ-WK - MO-JUL-DIFF (WS-END-OF-WK-MO)
END-PROC
Back to top
View user's profile Send private message
ksasi12@rediffmail.com

New User


Joined: 06 Oct 2005
Posts: 1
Location: pune

PostPosted: Fri Oct 07, 2005 10:08 am    Post subject: Easytreive
Reply with quote

Is there are any material for easytrieve[url][/url]
Back to top
View user's profile Send private message
jon_s_rice

Active User


Joined: 24 Mar 2005
Posts: 102
Location: Douglasville, GA USA

PostPosted: Fri Oct 07, 2005 5:12 pm    Post subject:
Reply with quote

Some of these lines are continued. You will need to add a "+" at the end of the line to continue these lines. CA does not make manuals available online.
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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am


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