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
This topic is locked: you cannot edit posts or make replies. Issue in suppressing leading zeros &a... Vijay_Sirisha COBOL Programming 21 Thu Jun 07, 2018 8:01 pm
No new posts VBS to VB in COBOL and JCL srajendran2 COBOL Programming 12 Fri Jun 01, 2018 3:04 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm
No new posts SYSADATA - COBOL - Structure displace... ganasrinivasan COBOL Programming 3 Thu May 24, 2018 9:45 pm

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