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

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
No new posts Another redefines in COBOL COBOL Programming 1
No new posts Redefines clause in symbolic map MPC ... CICS 1
No new posts Redefines usage COBOL Programming 15
No new posts Rename & Redefines COBOL Programming 5
Search our Forums:

Back to Top