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

difference beween alphanumeric and numeric in cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Wed Mar 03, 2010 12:00 pm
Reply with quote

Hi,

Plz explain me the difference beween alphanumeric and numeric in cobol with a sample example.

Can we move alphanumeric(x) to numeric(9) and also vice versa.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Mar 03, 2010 2:22 pm
Reply with quote

Hi Apsar
Quote:
Plz explain me the difference beween alphanumeric and numeric in cobol with a sample example.
Why dont you have a look into the manuals (link available on the top of this page) and let us know if you didn't find your answer..

Quote:
Can we move alphanumeric(x) to numeric(9) and also vice versa.
What happened when you tried it ? or what is being said in the manuals ?

Both your questions are pretty basic stuff which you can understand just by having a look into the manuals or testing them on your own ...
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Mar 03, 2010 6:22 pm
Reply with quote

apsar.kogatam wrote:
Plz explain me the difference beween alphanumeric and numeric in cobol with a sample example.
5.3.12.3.2 Numeric items
Types of numeric items are:
Binary
Packed decimal (internal decimal)
Zoned decimal (external decimal)
National decimal (external decimal)


5.3.12.3.4 Alphanumeric items
The PICTURE character-string must consist of either of the following:
One or more occurrences of the symbol X.
Combinations of the symbols A, X, and 9. (A character-string containing all As or all 9s does not define an alphanumeric item.)
Quote:
Can we move alphanumeric(x) to numeric(9) and also vice versa.
Numeric or numeric-edited:
When the category of the sending item is alphanumeric, alphanumeric-edited, national, or national-edited, the data is moved as if the sending item were described as an unsigned integer.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 03, 2010 8:37 pm
Reply with quote

Hello,

If you move pic x fields to numeric fields without ensuring they are valid numerics first, you will introduce many problems - including data errors and abends . . .
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top