Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
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
 
Redefining a comp-3 value with alphanumeric.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Redefining a comp-3 value with alphanumeric.
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    Post subject:
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    Post subject: Re: Redefining a comp-3 value with alphanumeric.
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    Post subject:
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    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 COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us