SELECT SUBSTR(I_TKT_NUM||'|'||(DIGITS(Q_SEQ_NUM))||'|'||C_TRB_ACT||
'|'||(DIGITS(Q_OUT_TIME_MM))||'|'||(DIGITS(Q_CLS_TIME_HHH))||
'|'||(DIGITS(Q_CLS_TIME_MM)),1,50)
FROM XXXXX.CIRTRBACT WHERE
The DIGITS function returns a character string representation of the argument.
More information
can be found in DB2 V3 SQL Reference, chapter 4.2.6.
The pipe (|) symbol was used to identify where one column value ended and the
next column value
began. This took care of the VARCHAR columns, and columns with NULLs as the
value.
Hope this helps.
Shivani
Forwarded Message:
===================
Date: 06/19/96 07:12:19 AM MDT
From: Rich_Specht @ PRINCETONSOFTECH.COM (Rich Specht) @ INNERMAIL
To: DB2-L @ AMERICAN.EDU (Multiple recipients of list DB2-L) @ INNERMAIL
cc:
Subject: Re: Unload DB2 tables to PC
Shawn Spiars suggested converting decimals to character format. Won't the
same thing have to happen for the integer type columns? Also, what will
happen with the length field for any VARCHAR columns? Won't these be mangled
when the data is converted from EBCDIC to ASCII?
I think some of the file transfer products can selectively translate data.
Maybe that could also help if a 3rd-party product isn't feasible.
Rich | Rich_...@PrincetonSoftech.com
============================================================================
On 18 Jun 96 at 21:12, SSp...@AOL.COM wrote:
> Subject: Re: Unload DB2 tables to PC
> You can convert the packed db2 numeric columns to unpacked numeric columns
> before you do your download. For example, if you were using COBOL to unload
> a db2 column defined as PIC S9(5)V99 COMP-3, you could first move it to a
> column defined something like PIC +9(5).99. This will unpack your data and
> provide a hard decimal point and sign digit.
>
> Shawn Spiars, Senior DBA
> American General Life Insurance Company
>
=====================
End Forwarded Message
It's OK, and the better of this is that I can put it on a UNLOAD Job (using
DSNTIAUL)
and it will be the same for all the tables I need (changing the sentence SQL
and the file).
>Hope this helps.
Yes, THank you.
If you are going from mainframe DB2 to DB2/2 for OS/2 or AIX
and have DDCS installed, the easiest way is on the pc side,
just EXPORT the mainframe table to a file on the pc side
in IXF format. DDCS handles all of the translations.
You then IMPORT the PC file into the tables on the
DB2/2 database.
all of the above can be done thru the command line processor
on the pc.
----------------------------------------------------------------------
Glenn Hoffman c...@atlanta.com voice - 770-795-0155
Team OS/2 fax - 770-795-0355
----------------------------------------------------------------------
I recall having to do this a while back - moving data into Excel spreadsheets.
I ended using QMF and exporting the data into IXF format which with a little
massaging using Fileaid/MVS was ablr to be downloaded to a PC and imported
into the spreadsheet.
___________________________________________________________
Laurence Chiu : Sydney, Australia
lc...@zip.com.au : Tel (02)9927-5000 (work)
[Palmtop News Reader - Version 1.1]