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
 

 

pic x redefining comp val.

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

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Apr 21, 2008 4:25 pm    Post subject: pic x redefining comp val.
Reply with quote

i have the following definitions..

Code:
01 Char-Value                      PIC  9(4)  COMP
                                              VALUE ZERO.

01 Char-Value-R                    REDEFINES  Char-Value.
   05  FILLER                      PIC  X(01).
   05  Char-Value-LSB              PIC  X(01).
       88  Uppercase-Char          VALUE 'A' THRU 'I'
                                         'J' THRU 'R'
                                         'S' THRU 'Z'
                                         X'4A' X'5A' X'80'
                                         X'9E' X'E0'.
       88  Lowercase-Char          VALUE 'a' THRU 'i'
                                         'j' THRU 'r'
                                         's' THRU 'z'
                                         X'6A' X'70' X'A1'
                                         X'9C' X'C0' X'D0'.



when i move 'P' to Char-Value-LSB i get the value of Char-Value as 0215.
Can anyone explain this ?

ashimer
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Apr 21, 2008 4:37 pm    Post subject: Re: pic x redefining comp val.
Reply with quote

ashimer wrote:
when i move 'P' to Char-Value-LSB i get the value of Char-Value as 0215.
Can anyone explain this ?
That is 215 decimal, aka D7 hex, aka 'P' character........Why shouldn't you get a value of 215?
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Apr 21, 2008 9:58 pm    Post subject:
Reply with quote

got it ... i was assuming decimal value of P to be 0223 ...
thanks cics guy ...
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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm
No new posts SIGNED DECIMAL TO COMP-3 using cobol ... ram_vizag COBOL Programming 1 Tue Mar 01, 2016 11:32 pm


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