View previous topic :: View next topic
|
Author |
Message |
mercy Warnings : 1 New User
Joined: 25 Jun 2006 Posts: 10 Location: Bangalore
|
|
|
|
Hi ,
How to convert ws-date x(8) to integer ?If ws-date is declared as
ws-date pic x(8) and if it is declared as
01 ws-date
02 ws-yy X(4)
02 ws-mm x(2)
02 ws-dd x(2)
can any one tell me both the ways.
Thanq |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
hi,
USE REDEFINES clause.
EG:
For WS-DATE PIC X(8).
WS-DATE-N REDEFINES WS-DATE PIC 9(8).
For more infomation look at quick reference.
~Vamsi |
|
Back to top |
|
|
mercy Warnings : 1 New User
Joined: 25 Jun 2006 Posts: 10 Location: Bangalore
|
|
|
|
Vamsi thanq for ur reply.
Actually my problem is that i am fetching records from input file which contains date field of format x(8).i have to compare this date with the current date and do some modifications on the yyyy of date field in the inputfile.so how can i do this ? I have used the following stmt to get current date.
ACCEPT ws-date from date yyyymmdd |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
hI,
Just let us know what exactly the format of DATE in Input and in what format u r reading the DATE from ACCEPT DATE..
You are not clear with your requirement.
~Vamsi |
|
Back to top |
|
|
|