× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: R: SQL Statement to create a comma-delimited file
  • From: "Peter Dow" <pcdow@xxxxxxxxxxxxxxx>
  • Date: Tue, 24 Oct 2000 11:57:03 -0700

Hi John,

Does it have to be 100% SQL? Use Domenico's method to create a normal PF,
then use CPYTOIMPF to create the comma-delimited version.

HTH,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- Original Message -----
From: <jfinney@omnia.co.za>
To: <MIDRANGE-L@midrange.com>
Sent: Tuesday, October 24, 2000 7:34 AM
Subject: Re: R: SQL Statement to create a comma-delimited file


>
> Hi Domenico
>
> Thanks for the reply. I was thinking of doing something similar to this
except
> embedded in an RPGLE progam. I could still trap for errors. The main
problem is
> that I'm not too sure how to syntax the statement where I would insert the
> fields into the newly-created pf.
>
> Not only do I need to trim and convert (ie. digits(FLDn)) the fields but I
need
> to concatenate them into one long field and write the record into the
> newly-created file. I have no idea how to do this in one SQL statement.
>
> Regards
> John.
>
>
>
> |--------+------------------------------->
> |        |          Finucci Domenico     |
> |        |          <Domenico.Finucci@Fid|
> |        |          italia.it>           |
> |        |                               |
> |        |          24/10/2000 01:57 PM  |
> |        |          Please respond to    |
> |        |          MIDRANGE-L           |
> |        |                               |
> |--------+------------------------------->
>   >-------------------------------------------------------|
>   |                                                       |
>   |       To:     "'MIDRANGE-L@midrange.com'"             |
>   |       <MIDRANGE-L@midrange.com>                       |
>   |       cc:     (bcc: John Finney/ITS/Omnia Group)      |
>   |       Subject:     R: SQL Statement to create a       |
>   |       comma-delimited file                            |
>   >-------------------------------------------------------|
>
>
>
>
>
>
> Hi, John. Try to write a CLP that executes:
> **  step 1: a procedure (RUNSQLSTM) to insert data into your file
> ** trap step 2: SQL error (MONSMG SQLxxxx) , run an SQL that issues a
CREATE
> TABLE as needed
> ** goto step 1, in order to populate the table.
>
> Sincerely
>
> Domenico Finucci
> Fiditalia , Milano, 02- 4301-2494
>
>
> -----Messaggio originale-----
> Da: jfinney@omnia.co.za [mailto:jfinney@omnia.co.za]
> Inviato: marted


----------------------------------------------------------------------------
----



ì 24 ottobre 2000 12.38
A: midrange-l@midrange.com
Oggetto: SQL Statement to create a comma-delimited file



Hi all,

I have a requirement whereby I need to insert x number fields into a table
on-the-fly. Now the table might already exist (if it was already created
before,
using a previous SQL statement). If the table does not exist, it needs to be
created and then populated with certain fields. The fields need to be all
character (ie. packed converted to char) and comma-delimited.

I was wondering if there was a way where I could execute this in one SQL
statement and, if not, as few SQL statements as possible.

Regards
John.


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.