HOW-MANY DAYS in Cobol



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

HOW-MANY DAYS in Cobol

Postby surime72 » Thu Oct 24, 2013 5:10 pm

Hi,
Variable HOW-MANY DAYS is defined our programs,But not sure what will do it can any one suggest on this..?

    WHERE GCPE47_INSERT_S > (CURRENT TIMESTAMP
                             - :HOW-MANY DAYS)
      AND A.GCPA15_GLOBL_FSA_R = B.GCPA15_GLOBL_FSA_R
      AND B.GCPA16_LAUNCH_Y > "2008-12-31"
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HOW-MANY DAYS in Cobol

Postby Akatsukami » Thu Oct 24, 2013 5:48 pm

The variable is HOW-MANY; DAYS is a SQL keyword. As to what is does,read the fine manual.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: HOW-MANY DAYS in Cobol

Postby surime72 » Thu Oct 24, 2013 5:55 pm

Thanks for reply,Can you please explain how it will work,if possible with example
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HOW-MANY DAYS in Cobol

Postby dick scherrer » Thu Oct 24, 2013 7:35 pm

Hello,

Suggest you look at the code and learn the way "HOW-MANY" is calculated.
Then learn the content of GCPE47_INSERT_S and how this was created.
Then determine why the difference (in days) is needed for this bit of code.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: HOW-MANY DAYS in Cobol

Postby surime72 » Fri Oct 25, 2013 4:38 pm

thanks I got it...!
surime72
 
Posts: 107
Joined: Sun Oct 23, 2011 1:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: HOW-MANY DAYS in Cobol

Postby dick scherrer » Mon Oct 28, 2013 12:40 am

Cool - thanks for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post