I need to build a cobol program that can get today date from system(mainframe) without extract from table.. Because i dont want to involve any table..
Is there any function can be use to get today date?
i have a doubt regarding the code to be developed for the following description.....
can u please provide me the code for the following description.....
i can't understand the description he has given below,please provide me the code if u know as early as possible....
7. The logic for to get date for Open and Closed work orders is provided below ?
? For Work Orders in closed status (W-WO-STAT = C),
Month is stored in W-MO ( 1 byte field 38th position) and values are
1-9 respectively from January to September
O - for October
A - December
Year is stored in W-YR (1 byte field 39Th position) and values and values are stored in 10 year revolving window fashion.
Like 5 - 2005 and 4 for 2004 and so on.
In program, define an array of 10 positions and always calculate last 10 years based on the processing year.
With this logic we can only get Year and Month for closed work order and only this will be provided. Day portion of this date will be left blank.
accept date-accp from date.
move date-accp(3:2) to month-disp.
move date-accp(5:2) to day-disp.
move date-accp(2:1) to year-disp.
*move 12 to month-disp.
if ( month-disp > 0 and month-disp< 10)
move month-disp(2:1) to W-MO
when 10 move 'o' to w-mo
when 11 move 'n' to w-mo
when 12 move 'd' to w-mo
delete the comment on the line "move 12 to month-disp" and move 10 or 11 or 12 to check weather it is working for oct,nov,dec.