Can we able to execute the following statement move a,b toc,d' What will happen ?

Questions by toprakashr

Showing Answers 1 - 14 of 14 Answers

Prakash

  • Sep 27th, 2005
 

No,It is not possible to execute this statement,

The syntax for the move is MOVE Identifier-1/Literal-1 to Identifier-2,Identifier-3..

You can move the one value to multiple variables but not multiple values to one variable or multiple values to multiple variables in one statement.

.

NIDHI

  • Nov 25th, 2005
 

It will move the values of a to c and b to d respectively, a and b remaining the same. Suppose a is 6, b is 9, c is 1, d is 2,

after execution of MOVE A, B TO C, D

values would be A-6

B-9

C-6

D-9

  Was this answer useful?  Yes

Mansoor

  • Mar 16th, 2006
 

Which one is the correct one...! Anyone let me know? Please....

  Was this answer useful?  Yes

Anuja Tiwari

  • Apr 5th, 2006
 

This will give a compilation error.

  Was this answer useful?  Yes

Ramya Krishnamurthy

  • Apr 11th, 2006
 

We ll not be able to execute the statement... It will give us a error message... As per syntax... we can move 1 variable to many or 1 to i but not many to many or many to one...

  Was this answer useful?  Yes

Ramya Krishnamurthy

  • Apr 11th, 2006
 

No we ll not be able to execute the statement... It ll give us a error message... As per the syntax... We ca move 1 to 1 or 1 to many but we cannot move many to 1 or many to many...

So the statement u r trying to execute is wrong...

u can make seperate move... wat u r trying to do is not possible

  Was this answer useful?  Yes

Kiran

  • Apr 17th, 2006
 

HI,

No we can't execute this statement, it's an error.

  Was this answer useful?  Yes

NarayaN

  • Apr 26th, 2006
 

The Closest group move statement would be MOVE CORRESPONDING.

MOVE CORRESPONDING GROUPA TO GROUPB

where,

01 GROUPA

 02 NAME PIC A(10)

 02 AGE PIC 99

02 GROUPB

 02 ST-DETAILS

    03 NAME PIC A(10)

    03 AGE PIC 99

  02 ST-MARKS

...

However, this can be used only on Group Variables and it'll move the values of the next level variables in Group A to the Group B.

  Was this answer useful?  Yes

intiaz ali

  • Oct 14th, 2006
 

No, we cant able to move by this syntax. its very confusing not only cobol complier but also human being. MOVE A,B TO C,D. Mean what .. a,b values has to move c,d ....

No, while a single sending field can be sent to multiple targets such as

MOVE A to C, D

the only way to send mutiple sending fields to multiple target fields is via a MOVE CORRESPONDING.

  Was this answer useful?  Yes

talluri

  • Jul 27th, 2011
 

one to many possible

many to many not possible

many to one not possible

many to many not possible

Babjee Talluri

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions