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
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