Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are
the ways for doing this?

Answers were Sorted based on User's Feedback



Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / jayaprabhu

hi all

Numeric can be moved to alphanumeric
and alphanumeric can be moved to numeric only if it has the
numeric data.

Is This Answer Correct ?    42 Yes 10 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / sivakumar sekharannair

Chakri and kavya are correct.We can move numeric to
alphanumeric and vice versa. error will be thrown only when
we do arithmetic operations when we move alpha numeric to
numeric data items .

Is This Answer Correct ?    21 Yes 1 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / jawaad

yes you can do both , but wait....

1) 9(9) to x(9) will be fine

2) x(9) to 9(9) may have problem in some cases:-

a) Suppose :x(9) has value "5"
when you move to 9(9) it will be
"5 " ,Yes 9(9) will have spaces
instead of
"000000005"
b)you will get soc7 when you perform arithemetic on x(9)
above

Is This Answer Correct ?    10 Yes 3 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / varun v

yes you can..use REDEFINES for the same purpose.

Move X(9) to 9(9):-

Working storage section:-
01 WS-VARX PIC X(9) VALUE SPACES.
01 WS-VARN REDEFINES WS-VARX PIC 9(9).

Now you can move X(9) variable to WS-VARX.Eventually it is
moved to the 9(9) variable WS-VARN.

Similarly viceversa..

Is This Answer Correct ?    18 Yes 12 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / kavya

Hello sir,
Why can't we move from alphanumeric to numeric.We
can.JUst check it out.

Is This Answer Correct ?    8 Yes 3 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / chakri

kavya is right. We can move numeric to alphanumeric and
vice versa. error will be thrown only when we do arithmetic
operations when we move alpha numeric to numeric data
items .

Is This Answer Correct ?    8 Yes 3 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / sp

Fully agree to Jayaprabhu.
We can move 9(9) to X(9). But if alphanumeric field
contains only numeric then and then we can move X(9) to 9
(9).

Is This Answer Correct ?    5 Yes 0 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / ajay

Sorry ..
I don't know why you are looking into Redefines clause for
the above ...
See what ever it is you can able to move from NUMERIC to
ALPHANUMERIC.But you can not able to move alphanumerics to
NUMERIC.
Move 9(9) to x(9) --possible
Move x(9) to 9(9) -- Not possible.
They may try to confuse you ... but don't give a chance to
them Thanks.

Is This Answer Correct ?    12 Yes 8 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / leena_kulkarni

Hey varun,
thanx for the answer but do you know the other way than
REDEFINES? Actually I was looking for that.

Is This Answer Correct ?    2 Yes 3 No

Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?..

Answer / harish

Hi,

i hope ajay's answer is correct,but if by moving we will
not get any error .suppose if we use recieved field in any
operation we will get soc07 ..

pls correct me if anything wrong

HARISH POOMGAME SHIVAPPA
NIIT TECHNOLOGY
KOLKATA

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More COBOL Interview Questions

how will u retreive value from a table.write it with syntex. 01 ws-table 05 ws-table1 occurs 10 times. 05 ws-table2 occurs 10 times. the above is 2 dimensional array..how will u retrieve 1st element of an array

3 Answers   ADP,


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,


Which of the following files can be OPENed in all the 4 modes? The four modes are INPUT, I-O, OUTPUT and EXTEND. (a) INDEXED (b) RELATIVE (c) SEQUENTIAL (d) All of the above

7 Answers   TCS,


What are the access modes of START statement?

0 Answers  


input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.

4 Answers  


what is lrec=f,what is difference between f,fb,v,vb?what is default value?how do we came to know that records are in f,fb,v,vb?

2 Answers   IBM, Wipro,


Explain Restart Logic in Cobol?

1 Answers   L&T, Syntel,


study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level

4 Answers   TCS,


01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2

9 Answers   HSBC,


in real time what is the suitable exp where in-stream procedure is better then catalog procedure.

1 Answers  


WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.

4 Answers   Atos Origin,


how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........

4 Answers   Wipro,


Categories