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: 1239
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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


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