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 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 Validate the Date girishb2 DFSORT/ICETOOL 8 Tue Sep 19, 2017 1:12 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm

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