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
 
difference beween alphanumeric and numeric in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: difference beween alphanumeric and numeric in cobol
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Mar 03, 2010 6:22 pm    Post subject: Re: difference beween alphanumeric and numeric in cobol
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

Site Director


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

PostPosted: Wed Mar 03, 2010 8:37 pm    Post subject:
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    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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

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