Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

RESULT OF STATMENT Move a, b to c, d

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

New User


Joined: 09 Oct 2007
Posts: 22
Location: chennai.India

PostPosted: Wed Oct 10, 2007 10:57 am    Post subject: RESULT OF STATMENT Move a, b to c, d
Reply with quote

Could any one tell me the result of the following statment.

Move a, b to c, d
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 10, 2007 11:41 am    Post subject:
Reply with quote

Try it ..it's faster.. why to wait some 'forum' to answer you.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Wed Oct 10, 2007 12:54 pm    Post subject: Re: RESULT OF STATMENT Move a, b to c, d
Reply with quote

NAGARJUN CARALAPATI wrote:
Could any one tell me the result of the following statment.

Move a, b to c, d



a is moved to c and b is moved to d
This is incorrect.
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Wed Oct 10, 2007 1:15 pm    Post subject: Reply to: RESULT OF STATMENT Move a, b to c, d
Reply with quote

Yes it is true as said by sri
This is incorrect.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Oct 10, 2007 3:05 pm    Post subject: Re: RESULT OF STATMENT Move a, b to c, d
Reply with quote

sri_mf wrote:
a is moved to c and b is moved to d
Say what?
I'm from skeptical, show me the link......
Back to top
View user's profile Send private message
sdaundkar

New User


Joined: 11 Oct 2007
Posts: 1
Location: New York

PostPosted: Fri Oct 12, 2007 1:47 am    Post subject: Reply to: RESULT OF STATMENT Move a, b to c, d
Reply with quote

I don't think that's correct syntax for a MOVE statement !!
Back to top
View user's profile Send private message
annujp

New User


Joined: 31 Aug 2005
Posts: 39
Location: St Paul,MN

PostPosted: Fri Oct 12, 2007 1:57 am    Post subject:
Reply with quote

I tried this out, the statement gave a compile error.
Code:

MOVE 'A'                   TO WS-A.       
MOVE 'B'                   TO WS-B.       
MOVE WS-A, WS-B            TO WS-C, WS-D.
DISPLAY 'WS-C' WS-C.                     
DISPLAY 'WS-D' WS-D.


The compile error i got is
Code:

The "MOVE" statement was invalid.  Expected "TO", but found "WS-B"
The statement was discarded.


Hope this helps.
Anitha
Back to top
View user's profile Send private message
inamadugu
Warnings : 1

New User


Joined: 23 Aug 2007
Posts: 18
Location: Delhi

PostPosted: Tue Oct 16, 2007 9:36 am    Post subject: Reply to: RESULT OF STATMENT Move a, b to c, d
Reply with quote

Hi,

You cannot move two values at a time to another two values.

There should be one sending field and can be any receiving fields.

like:
MOVE WS-A TO WS-C,WS-D. (is possible)
where ws-a is the sending field and ws-c, ws-d are receiving fields

your code can only be written as below.

MOVE 'A' TO WS-A.
MOVE 'B' TO WS-B.

MOVE WS-A TO WS-C.
MOVE WS-B TO WS-D.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Tue Oct 16, 2007 10:10 am    Post subject: Reply to: RESULT OF STATMENT Move a, b to c, d
Reply with quote

I have seen in some references but i have not tried it.

Thanks for correcting me..
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 10:25 am    Post subject:
Reply with quote

Sri,

Quote:
I have seen in some references

Could you redirect us to the link or copy the code what you had seen.
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
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
This topic is locked: you cannot edit posts or make replies. How to run and see the result of DFH$... lind sh CICS 2 Wed Jul 27, 2016 7:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us