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 How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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