IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Redefining a comp-3 value with alphanumeric.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
varunks_1980

New User


Joined: 14 Nov 2005
Posts: 2

PostPosted: Tue Nov 29, 2005 2:19 pm
Reply with quote

HI Frnds,

Can we redefine var-1 pics9(5) comp-3 by var-2 pic x(3)?

is it possible or not?

Regards,

VK
Back to top
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Tue Nov 29, 2005 2:44 pm
Reply with quote

HI VK,


WE CAN DECLARE LIKE THAT. NO PROBLEM.








THANK'S
THANOOZ.
Back to top
View user's profile Send private message
varunks_1980

New User


Joined: 14 Nov 2005
Posts: 2

PostPosted: Tue Nov 29, 2005 3:56 pm
Reply with quote

Hi,


So, r u sure that a comp-3 value can be redefined?

and if so wat would the changes when we display var-2?






Thanks in advance
VK
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Dec 02, 2005 8:14 am
Reply with quote

Hi VK,

You CAN redefine as an A/N field. If you DISPLAY it (i.e. use the DISPLAY verb) you will more than likely get non-printable chars (i.e. blanks).

If you access your SYSOUT via SDSF and use the SE cmd instead of S, you can then use the HEX cmd on the cmd line.

You'll see that the comp-3 data was "displayed". For example, "123C".

If you displayed var-1 you would see "12C" without the help of the HEX cmd..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top