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
 

 

Junk data when moving alphabetic to numeric type

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
nag
Warnings : 1

New User


Joined: 29 Jul 2005
Posts: 20

PostPosted: Mon Nov 05, 2007 10:35 am    Post subject: Junk data when moving alphabetic to numeric type
Reply with quote

I have the variables declared like this.

05 WS-E PIC X(05) VALUE 'ABCDE'.
05 WS-F PIC 9(05) VALUE ZEROES.

Now i am moving WS-E TO WS-F.

But i think if we try to move alphabetic to numeric type we should get SOC7.But i tried thsi and i m getting some junk data.Can any one expalin this.

This the displayed output.

WS-E: ABCDE
WS-F: ABCD5
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Nov 05, 2007 10:47 am    Post subject: Reply to: Basic doubt in cobol
Reply with quote

nag,

Quote:
But i think if we try to move alphabetic to numeric type we should get SOC7.But i tried thsi and i m getting some junk data.Can any one expalin this.



SOC7 will occur only when you do arithmetic operations on a variable with non-numeric data and not when u move alphabets to numeric field.

Similar topic was discussed days before. Search this forum.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Nov 05, 2007 10:49 am    Post subject:
Reply with quote

Nag,

This was discussed sometime back. Search the forum.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Nov 05, 2007 10:53 am    Post subject: Reply to: Basic doubt in cobol
Reply with quote

nag,

Check this link.

http://ibmmainframes.com/viewtopic.php?t=6130
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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