Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Help needed on date field conversion

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

New User


Joined: 13 Nov 2006
Posts: 10

PostPosted: Sat Jun 13, 2009 8:15 pm    Post subject: Help needed on date field conversion
Reply with quote

Hi,

I have a date field defined as S9(8) Comp-3. I need to convert this to a simple 9(8) format. I tried moving S9(8) Comp-3 to a S9(8) variable and then S9(8) to a 9(8). But it is not working as the last byte in 9(8) shows I.

Let me know how can I get the date in 9(8) format.

Thanks
CB
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Sat Jun 13, 2009 8:58 pm    Post subject: Reply to: Help needed on date field conversion
Reply with quote

Just move the PIC S9(08) signed COMP-3 field directly to a PIC 9(08) unsigned display-numeric field and all will be forgiven.... icon_rolleyes.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Jun 14, 2009 8:59 am    Post subject:
Reply with quote

Call me a skeptic, but I don't believe you when you say that
Quote:
the last byte in 9(8) shows I.
Take Bill's advice and skip the unnecessay MOVE.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Mon Jun 15, 2009 2:12 am    Post subject: Reply to: Help needed on date field conversion
Reply with quote

The only two ways I can guess that the unsigned display-numeric field's last byte had a 'C' zone-nibble, are -

A) The unsigned display-numeric field redefines the signed display-numeric field.

B) The signed display-numeric field is being moved to the unsigned display-numeric field, using reference modification, which treats the move as an internal MVC without regard for the data, in other words, as-is.

Other than these two thoughts, I'm fresh out of ideas....
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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Conversion of UTF-8 to EBCDIC muralikrishnan_new COBOL Programming 1 Tue Nov 21, 2017 5:33 pm
No new posts Mainframe Blocks to Tracks conversion upendrasri JCL & VSAM 1 Sat Nov 18, 2017 10:52 am
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us