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
 

 

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: 2502
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: 2502
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 date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


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