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
 
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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
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

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