IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts first column truncated in search result IBM Tools 13
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts executing XCTL command in COBOL witho... CICS 10
Search our Forums:

Back to Top