| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
Young zhang
Joined: 13 Jun 2008
Posts: 15
Location: china
|
| Posted: Fri Aug 15, 2008 10:32 am Post subject: |
|
|
| How to use accept day of week?? |
|
| Back to top |
|
ulfnsc
Joined: 15 Jan 2004
Posts: 18
Location: Stockholm, SWEDEN
|
| Posted: Fri Aug 15, 2008 12:39 pm Post subject: |
|
|
in your cobol-DB2 program?
/ulf |
|
| Back to top |
|
Young zhang
Joined: 13 Jun 2008
Posts: 15
Location: china
|
| Posted: Fri Aug 15, 2008 12:51 pm Post subject: |
|
|
| Hi ulfnsc, only cobol program. |
|
| Back to top |
|
ulfnsc
Joined: 15 Jan 2004
Posts: 18
Location: Stockholm, SWEDEN
|
| Posted: Fri Aug 15, 2008 1:05 pm Post subject: |
|
|
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
Joined: 12 Aug 2008
Posts: 8
Location: Johannesburg
|
| Posted: Fri Aug 15, 2008 3:26 pm Post subject: |
|
|
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
Joined: 15 Jan 2004
Posts: 18
Location: Stockholm, SWEDEN
|
| Posted: Fri Aug 15, 2008 4:44 pm Post subject: |
|
|
... copy and paste, oops
:oops:
/ulf |
|
| Back to top |
|
Sambhaji
Joined: 16 Feb 2007
Posts: 267
Location: Pune, India
|
| Posted: Mon Aug 18, 2008 12:42 pm Post subject: |
|
|
| Code by ulf looks fine to me too :? :? |
|
| Back to top |
|
Young zhang
Joined: 13 Jun 2008
Posts: 15
Location: china
|
| Posted: Mon Aug 18, 2008 1:34 pm Post subject: Thanks to you all!! |
|
|
Dear all,
Thank you for your help. I can solve this problem now.
/Young |
|
| Back to top |
|
dick scherrer
Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St
|
| Posted: Mon Aug 18, 2008 7:23 pm Post subject: Reply to: How to use accept day of week?? |
|
|
Hello,
Good to hear you have a solution :)
If you post your solution, it will probably help someone with a similar question later :wink:
d |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|