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
 

 

What's the result: MOVE A to B and B to A

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ruby.sen
Currently Banned

New User


Joined: 04 Feb 2006
Posts: 6

PostPosted: Sat Feb 04, 2006 9:34 pm    Post subject: What's the result: MOVE A to B and B to A
Reply with quote

If there is a declaration as :

01 ws-sal1 pic x(5)
01 ws-sal2 pic s9(5) comp-3

what will happen if:
1. move ws-sal1 to ws-sal2
2. move ws-sal2 to ws-sal1

Such kind of move is possible or not if yes how and if not what is the error we get . Do we get runtime error or compilation error?

How do we solve this problem?

REASON TO BAN: Use meaningful Topic Title
Back to top
View user's profile Send private message

vinodmaanju

New User


Joined: 10 May 2005
Posts: 28
Location: Pune

PostPosted: Sat Feb 04, 2006 9:47 pm    Post subject:
Reply with quote

we will get S0C7 abend
Back to top
View user's profile Send private message
richie_techin

New User


Joined: 21 Jan 2006
Posts: 16
Location: india

PostPosted: Sat Feb 04, 2006 10:06 pm    Post subject: move error
Reply with quote

hi ruby,

U will get a DATA EXCEPTIONAL ERROR i.e. S0c7
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 05, 2006 8:53 am    Post subject:
Reply with quote

It depends on the content of ws-sal1. If all the chars are numeric there s/b no prob.

If any of the non lo-ord chars have lo-ord nibbles that are not 0 thru 9 or the lo-ord char is a non-numeric and is not of the form X'Cn' or X'Dn' you will abend on the move back w/an 0C7.

Probably more than you wanted to know, but it's da truff.
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
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 4 Sun Mar 12, 2017 5:35 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm


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