Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Handling result sets in the calling N... Rusikesh DB2 7 Fri Apr 13, 2018 12:25 am
No new posts RMM Cannot move a volume from SHELF l... tspr52 IBM Tools 0 Thu Mar 01, 2018 3:48 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us