MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting Signed numeric field to Comp-3 using Easytrieve

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
yugee
Beginner


Joined: 17 Sep 2005
Posts: 25
Topics: 8

PostPosted: Sun Jan 08, 2006 3:11 am    Post subject: Converting Signed numeric field to Comp-3 using Easytrieve Reply with quote

Hi,

I have an input file which has a field. I want to load the field to data base which has a different declaration. My problem is to convert the field format to suit the database format.

This is my field format in input file:
total of 17 bytes (13,2). (PIC +9(13).(2))
for example: -0000001234234.34

In data base we have declared the field as Decimal(15,2). which becomes
PIC S9(13)V9(2) USAGE COMP-3.

it will occupy 8 bytes.

So, i want to convert the field with 17 bytes to 8 bytes.

Could any one please help me to conver this using EASYTRIEVE. Is there any other way we can do this.I don't want to write a COBOL program just for this.

Thanks,
Yugee
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Jan 08, 2006 8:49 am    Post subject: Reply with quote

Yugee,

Please post your question only once and in only one forum. When you post the same question in multiple forums, you can cause confusion and frustration for the people that are attempting to help you. Use meaningful topic titles. "Converting signed numeric field to packed decimal using Easytrieve" would an approriate title.

Second Please search before posting. This has been discussed earlier. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=24520#24520

Just change the definitions to the following
Code:

FILE INFILE                                             
     AMT-S            01 001 A                           
     AMT-NUM          *  013 N                           
     AMT-DOT          *  001 A                           
     AMT-DEC          *  002 N                           
                                                           
                                                           
  W-NUM           W  15 N 0                               
  W-AMT1 W-NUM       13 N 0                               
  W-AMT2 W-NUM   +13 02 N 0                               
                                                           
  FILE OUTPUT  FB(0 0)                                     
       O-AMT      01 8 P 2                               
                           


Hope this helps...

Cheers

Kolusu

PS: I am deleting your duplicate post in Utilities forum and changing the title also.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vst
Beginner


Joined: 23 Jan 2006
Posts: 11
Topics: 0

PostPosted: Mon Jan 23, 2006 9:59 am    Post subject: Reply with quote

Yogee,

you may try

http://www.gomel.iba.by/en/show/pages/147/148/mass-conversion_tool

in order to find appropriate Cobol data declarations from Easytrieve source code
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group