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
 

 

Packed Decimal to Numeric Using Eztrieve

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

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Thu Mar 13, 2008 2:39 am    Post subject: Packed Decimal to Numeric Using Eztrieve
Reply with quote

Friends,

I got a field in VSAM file which is in packed decimal format(COMP3)


Attribute 1 :

In cobol it is defined as below

FIELD1 PIC 9(07) COMP-3.

In eztrieve it is defined to be

FIELD1 197 4 P 0 +
MASK 'ZZZZZZZ'

Attribute 2

Field2 54 6 P 4 +
MASK 'ZZZZZZZ.ZZZZ-'
In cobol as

Field2 PIC S9(06)V9999 COMP-3.

Queries

1. How should i define my eztrieve filed so that comp3 packed decimal gets converted into an ordinary (or) edit decimal type.

2. If i am going to use Move like command in my program, will the move statement refer to only field names in the move statement of the record (or) does it look at the field attribute type as well ?
Back to top
View user's profile Send private message

anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Thu Mar 20, 2008 2:52 pm    Post subject: Reply to: Packed Decimal to Numeric Using Eztrieve
Reply with quote

Hi
In the output define that field as numeric and move it.i hope it will work
for an ex
Input
XXXXX x P 2
Output
XXXXX X N 0
move the input to a working storage and then move it to output
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 Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm


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