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

What are the compile option in IGYWCLG utility


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amajhi

New User


Joined: 21 Jul 2006
Posts: 18
Location: Pune

PostPosted: Mon Apr 23, 2007 4:17 pm
Reply with quote

Hi Guys,

As we all know if Alphanumeric item is moved to Numeric item,we will get
Abend SOC7 but it's strange I am not getting this abend while junk value has been moved to Numeric item.

Is there any compile option which allows Alphanumeric field to be moved in Numeric ?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Apr 23, 2007 4:29 pm
Reply with quote

amajhi wrote:
As we all know if Alphanumeric item is moved to Numeric item,we will get Abend SOC7
No, we didn't know.....Neither PACK, UNPK or MVC will raise a data exception no matter what "junk" you feed them.
Quote:
Is there any compile option which allows Alphanumeric field to be moved in Numeric ?
You don't need a compile option when it is a legal move.
Back to top
View user's profile Send private message
amajhi

New User


Joined: 21 Jul 2006
Posts: 18
Location: Pune

PostPosted: Mon Apr 23, 2007 4:55 pm
Reply with quote

So William, If we move Alphanumeric to Numeric it will not give SOC7.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Apr 23, 2007 4:57 pm
Reply with quote

Not the move, it is even listed as a legal COBOL move.
What you do with that data could very well result in the S0C7......
By the way, that is an alpha "S" for system followed by the hex string zero charlie seven......
Back to top
View user's profile Send private message
amajhi

New User


Joined: 21 Jul 2006
Posts: 18
Location: Pune

PostPosted: Mon Apr 23, 2007 5:06 pm
Reply with quote

I have declared two variables as :

05 ws-var-1 pic X(3) value 'ABC".
05 ws-var-2 pic 9(3) value 001.

then i am moving ws-var-1 to ws-var-2,but getting junk values in ws-var-2 instead of SOC7.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Apr 23, 2007 5:21 pm
Reply with quote

amajhi wrote:
I have declared two variables as :
05 ws-var-1 pic X(3) value 'ABC".
05 ws-var-2 pic 9(3) value 001.
then i am moving ws-var-1 to ws-var-2,but getting junk values in ws-var-2 instead of SOC7.
OK, what is your point?
If you really want to try for that S0C7, try majing the ws-var-2 a comp field, CVB will raise a data exception......
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Apr 24, 2007 1:44 pm
Reply with quote

Hi

Try some condition check or computation with ws-var-2....

Thanks
Arun
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Apr 24, 2007 2:18 pm
Reply with quote

ws-var-2 should print (in display statement) 123 after you move ws-var-1 to ws-var-2.
You will not get S0C7 until you do arithmatic operation on non-numeric data in PACKED-DECIMAL format.
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 Compile rexx code with jcl CLIST & REXX 6
No new posts SCOPE PENDING option -check data DB2 2
No new posts REASON 00D70014 in load utility DB2 6
No new posts C Compile time time stamps Java & MQSeries 10
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
Search our Forums:

Back to Top