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
 
Can we redefines x(4) with 9(4)

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

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Mon May 23, 2005 11:28 am    Post subject: Can we redefines x(4) with 9(4)
Reply with quote

hi,

can we redefines x(4) with 9(4)

bye,
ks reddy.
Back to top
View user's profile Send private message

kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Mon May 23, 2005 11:52 am    Post subject:
Reply with quote

ya u can, but only the problem will be if X94) is containing spaces and if u try to check some condition clause like the varibale of PIC 9(4) is compared with ZEROES, like
01 var1 pic X(4) value SPACES.
02 var2 redefines VAR1 pic 9(04).

and in code
if VAR2 is greater than ZEROES

...then i think in this case u will get run time erro like OC7.
correct me if i m wrong.
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Mon May 23, 2005 11:55 am    Post subject: Re: redefines
Reply with quote

Hi,
Kanak is right.
Back to top
View user's profile Send private message
knd_r
Currently Banned

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Mon May 23, 2005 8:20 pm    Post subject:
Reply with quote

hi,

but in real scenario, i dont know which data is present in x(4). then what will be the situation?

thanks,
ks reddy.
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Mon May 23, 2005 10:23 pm    Post subject:
Reply with quote

Quote:
which data is present in x(4).


EBCDIC data.
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 Another redefines in COBOL RahulG31 COBOL Programming 1 Fri Mar 20, 2015 4:09 am
No new posts Redefines clause in symbolic map MPC ... eprasad629 CICS 1 Sun Jan 15, 2012 12:18 am
No new posts Redefines usage nirmal.poikaikumaran COBOL Programming 15 Wed Mar 09, 2011 6:33 pm
No new posts Rename & Redefines srk.neeraj COBOL Programming 5 Mon Feb 14, 2011 6:06 pm
No new posts Defining REDEFINES cobol field in EZT rgupta71 CA Products 4 Mon Jan 31, 2011 9:30 pm

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