Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups 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 -> Mainframe COBOL
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
References
kanak

Moderator


Joined: 12 Mar 2005
Posts: 259
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: 367
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: 624
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1