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 

Writing decimal data to a output file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Thu Mar 29, 2007 1:36 pm    Post subject: Writing decimal data to a output file Reply with quote

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
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Mar 30, 2007 2:16 am    Post subject: Reply with quote

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
View user's profile Send private message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Fri Mar 30, 2007 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
arnold57
Beginner


Joined: 01 Oct 2004
Posts: 30
Topics: 0

PostPosted: Tue Apr 03, 2007 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
vjkumk
Beginner


Joined: 28 Sep 2005
Posts: 98
Topics: 33

PostPosted: Wed Apr 04, 2007 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Apr 04, 2007 1:30 pm    Post subject: Reply with quote

vjkumk,

check this link

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

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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