View previous topic :: View next topic
|
Author |
Message |
Young zhang
New User
Joined: 13 Jun 2008 Posts: 15 Location: china
|
|
|
|
How to use accept day of week?? |
|
Back to top |
|
|
ulfnsc
New User
Joined: 15 Jan 2004 Posts: 19 Location: Stockholm, SWEDEN
|
|
|
|
in your cobol-DB2 program?
/ulf |
|
Back to top |
|
|
Young zhang
New User
Joined: 13 Jun 2008 Posts: 15 Location: china
|
|
|
|
Hi ulfnsc, only cobol program. |
|
Back to top |
|
|
ulfnsc
New User
Joined: 15 Jan 2004 Posts: 19 Location: Stockholm, SWEDEN
|
|
|
|
OK
DAY-OF-WEEK
Has the implicit PICTURE 9(1).
The single data element represents the day of the week according to the following values:
1 represents Monday 5 represents Friday
2 represents Tuesday 6 represents Saturday
3 represents Wednesday 7 represents Sunday
4 represents Thursday
Code: |
ACCEPT ws-nr-day-of-week FROM DAY-OF-WEEK
....
evaluate ws-nr-day-of-week
when 1
move "monday" to ws-day-of-week
when 1
move "tuesday" to ws-day-of-week
.
.
end-evaluate |
/ulf |
|
Back to top |
|
|
GrantP
New User
Joined: 12 Aug 2008 Posts: 8 Location: Johannesburg
|
|
|
|
Small correction necessary
Code: |
evaluate ws-nr-day-of-week
when 1
move "monday" to ws-day-of-week
when 2
move "tuesday" to ws-day-of-week
.
.
end-evaluate |
|
|
Back to top |
|
|
ulfnsc
New User
Joined: 15 Jan 2004 Posts: 19 Location: Stockholm, SWEDEN
|
|
|
|
... copy and paste, oops
/ulf |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Code by ulf looks fine to me too |
|
Back to top |
|
|
Young zhang
New User
Joined: 13 Jun 2008 Posts: 15 Location: china
|
|
|
|
Dear all,
Thank you for your help. I can solve this problem now.
/Young |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Good to hear you have a solution
If you post your solution, it will probably help someone with a similar question later
d |
|
Back to top |
|
|
|