Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Export file to HP cobol application.

Author  Topic 

rongrzywacz
Yak Posting Veteran

57 Posts

Posted - 2002-05-28 : 17:01:21
Help,
I need to generate a data file for input to a cobol application on an HP system. The numeric fileds need to be defined as S9(7)V99.
( Ex +6.50 would be 000650{ ) ??

Any ideas on how to do this in SQL server?

Thanks for any assistance,
RG

Ron Grzywacz

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-05-29 : 11:34:07
You would create a DTS package, define a data pump task from the SQL Server to a text file, and create an ActiveX transform that makes the manipulation you want.

setBasedIsTheTruepath
<O>
Go to Top of Page

rongrzywacz
Yak Posting Veteran

57 Posts

Posted - 2002-05-29 : 11:50:16
Thanks for the info!
I was looking for info on how to covnert the data from a float to a Ascii character with trailing sign.

Ron Grzywacz
Go to Top of Page

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-05-29 : 11:54:10
You would have to do it manually using VBScript. There isn't a built-in function that does this.

setBasedIsTheTruepath
<O>
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-05-29 : 12:06:36
See if this works:

SELECT Replace(Str(numberColumn * 100.00, 6, 0), ' ', '0') + '{' AS FormattedNumber
FROM myTable


Go to Top of Page
   

- Advertisement -