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
 

 

Alphanumeric to packed decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
jassi123

New User


Joined: 27 Mar 2007
Posts: 2
Location: India

PostPosted: Fri Nov 02, 2007 12:40 am    Post subject: Alphanumeric to packed decimal
Reply with quote

How to convert an alphanumeric value to packed decimal. The alphanumeric variable is holding number only and no alphabets.
For eg. alphanumeric varible has '12345' as the value. Now the requirement is just to change the type to packed decimal.
Back to top
View user's profile Send private message

jassi123

New User


Joined: 27 Mar 2007
Posts: 2
Location: India

PostPosted: Fri Nov 02, 2007 12:50 am    Post subject: Re: Alphanumeric to packed decimal
Reply with quote

Forgot to mention earlier... this is to be done in a eztrieve program...
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: Fri Nov 02, 2007 1:54 am    Post subject:
Reply with quote

Hello jassi and welcome to the forums,

If you are completely sure the field will always contain numerics only, you could redefine it as a zoned decimal number and move the zd field to the comp-3 field.

If the field ever contained an invalid value, you would have to deal with an abend.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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