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 Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
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


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