View previous topic :: View next topic |
Author |
Message |
vjkumk Beginner
Joined: 28 Sep 2005 Posts: 98 Topics: 33
|
Posted: Thu Mar 29, 2007 1:36 pm Post subject: Writing decimal data to a output file |
|
|
Hi,i have to get values from a flatfile according to the testcase,my output file contains test case number,data retrived according to testcase.now,i have to insert these to a tableThe table columns and datatype as follows.
testcase number integer type
testcase data char type
i am using a bmcload utility to insert the output file to the table.the problem is the testcase number in the table,my output file contains testcase number in char type,where as in the table is of integer type.is this will casue any change in data?can we use the decimal function in db2,is there anyway in rexx that we can write the ouput file in decmial format?My output file must contain both decimal and char type values. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Mar 30, 2007 2:16 am Post subject: |
|
|
have you actually tried it yet to see if you have a problem? _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
vjkumk Beginner
Joined: 28 Sep 2005 Posts: 98 Topics: 33
|
Posted: Fri Mar 30, 2007 9:06 pm Post subject: |
|
|
The table i have to load is a production one,so i feel that it has to be tested before loading data,somehow i got the privilage to create those table under my db2 id.the db2 automatically converts numeric character to integer.the problem is solved on this part.
to write a ouput file,i tried with the rexx function C2D
but it is throwing error when trying to write along with char data
VJ |
|
Back to top |
|
 |
arnold57 Beginner
Joined: 01 Oct 2004 Posts: 30 Topics: 0
|
Posted: Tue Apr 03, 2007 5:19 pm Post subject: |
|
|
You probably need to use function D2C.
For example, D2C(123,4) will result in a 4-byte "integer" with a value of 123. |
|
Back to top |
|
 |
vjkumk Beginner
Joined: 28 Sep 2005 Posts: 98 Topics: 33
|
Posted: Wed Apr 04, 2007 11:58 am Post subject: |
|
|
I will make my query clear,
in pl1 and cobol ,there are datatypes like fixed decimal ,as per my knowledge rexx does not have a datatype,it usually uses char type.In pl1 and cobol we can write decimal and char type using structure or pointer to the output file
ex. In PL1
01 out1,
05 name char(10),
05 age fixed dec(5,0);
using the above struc,decimal and char data can be written to output file,is there any way in rexx to write the output file as mentioned above,the single record should contain both char and decimal data. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|