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
 

 

How to use accept day of week??

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Young zhang

New User


Joined: 13 Jun 2008
Posts: 15
Location: china

PostPosted: Fri Aug 15, 2008 10:32 am    Post subject:
Reply with quote

How to use accept day of week??
Back to top
View user's profile Send private message

ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Fri Aug 15, 2008 12:39 pm    Post subject:
Reply with quote

in your cobol-DB2 program?

/ulf
Back to top
View user's profile Send private message
Young zhang

New User


Joined: 13 Jun 2008
Posts: 15
Location: china

PostPosted: Fri Aug 15, 2008 12:51 pm    Post subject:
Reply with quote

Hi ulfnsc, only cobol program.
Back to top
View user's profile Send private message
ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Fri Aug 15, 2008 1:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
GrantP

New User


Joined: 12 Aug 2008
Posts: 8
Location: Johannesburg

PostPosted: Fri Aug 15, 2008 3:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ulfnsc

New User


Joined: 15 Jan 2004
Posts: 19
Location: Stockholm, SWEDEN

PostPosted: Fri Aug 15, 2008 4:44 pm    Post subject:
Reply with quote

... copy and paste, oops
icon_redface.gif

/ulf
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Aug 18, 2008 12:42 pm    Post subject:
Reply with quote

Code by ulf looks fine to me too icon_confused.gif icon_confused.gif
Back to top
View user's profile Send private message
Young zhang

New User


Joined: 13 Jun 2008
Posts: 15
Location: china

PostPosted: Mon Aug 18, 2008 1:34 pm    Post subject: Thanks to you all!!
Reply with quote

Dear all,

Thank you for your help. I can solve this problem now.

/Young
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: Mon Aug 18, 2008 7:23 pm    Post subject: Reply to: How to use accept day of week??
Reply with quote

Hello,

Good to hear you have a solution icon_smile.gif

If you post your solution, it will probably help someone with a similar question later icon_wink.gif

d
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 A good week so far Ed Goodman General Talk & Fun Stuff 2 Wed May 15, 2013 8:27 pm
No new posts Cobol Accept date VS Db2 Current time... pmvino DB2 7 Fri Oct 05, 2012 7:59 pm
No new posts Display DAY of Week using SYNCSORT Shaheen Kalokhe SYNCSORT 1 Mon Sep 24, 2012 1:02 pm
No new posts Can we accept data using ADDPOP popup... bipinpeter TSO/ISPF 5 Thu Sep 13, 2012 12:18 pm


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