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 convert ws-date x(8) to integer

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

New User


Joined: 25 Jun 2006
Posts: 10
Location: Bangalore

PostPosted: Thu Aug 10, 2006 12:50 pm    Post subject: How to convert ws-date x(8) to integer
Reply with quote

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

shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Aug 10, 2006 4:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mercy
Warnings : 1

New User


Joined: 25 Jun 2006
Posts: 10
Location: Bangalore

PostPosted: Thu Aug 10, 2006 4:54 pm    Post subject: Re: How to convert ws-date x(8) to integer
Reply with quote

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

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Aug 10, 2006 5:26 pm    Post subject:
Reply with quote

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
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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


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