×

Good News Everybody!

A new search engine is coming soon.

As a stop gap measure, we are using Google's custom search engine service.




Hi Jerry

Column headings are not data, CPYTOIMPF did not used to include them, but IBM added the ADDCOLNAM from 6.1 -- you are at 5.4, right?

But here is an article from IBM on how to do it at 5.4 - https://www.ibm.com/support/pages/adding-column-headings-cpytoimpf-output-streamfiles

Here are 2 more articles on doing this -

https://www.itjungle.com/2010/02/17/fhg021710-story02/
https://www.rpgpgm.com/2014/05/adding-column-headings-to-file-in-ifs.html

It looks like they run CPYTOIMPF 2 times, once for just the headings from another table, (maybe SYSCOLUMNS for your table), and a second time for the actual data.

Do you have Access Client Solutions? There is a tool there to Run SQL Scripts, and you can save the output to a file, including CSV files and others

Regards
Vern

On 3/23/2022 9:46 AM, jerry ven wrote:
i was able to download this IFS file using ASCII ( as checked it's CCSID
was 37) and by mentioning in TOSTMF parameter (in CPYTOIMPF command)
complete IFS Path but unable to download it *(* by following same FTP
steps in this link
*https://www.ibm.com/support/pages/ftp-ascii-file-members-between-pc-and-os400
<https://www.ibm.com/support/pages/ftp-ascii-file-members-between-pc-and-os400>
* just made one change in this command as per my requirement instead of
mentioning source file ,library and member name i just gave complete IFS
path for that CSV file in TOSTMF parameter of CPYTOIMPF command *)*
with column headings so to download it along with column headings what
could be done here?


Thanks.

On Wed, 23 Mar 2022 at 19:56, Javier Sanchez <
javiersanchezbarquero@xxxxxxxxx> wrote:

Jerry, why don¡t you rather try this download with a simple QSYS path?

This should look like this after invoking FTP:

OPEN you_ibm_i_name_or _ip_address
Type in your user name
Type in your password
GET (hit enter to be prompted)
Remote filename: YOURLIB/YOURFILE.YOURMEMBER
Local filename: your_local_file_name_as_you_name_it.your ext

Then inspect your contents. If it looks like garbage, then, repeat and
before issuing the GET command above, issue a BIN command first.
Then follow on with the GET.

Try this and let us know.

Javier

El mié, 23 mar 2022 a las 8:18, jerry ven (<jerryven95@xxxxxxxxx>)
escribió:

I simply meant to say for TOSTMF WITH IFS file location here i just gave
example in actual CPYTOIMPF command i am using '/IFS PATH' ( IFS Path
means
i am giving exact IFS location of that CSV file)

So not sure how can i download it with complete column headings here.


Thanks.

On Wed, 23 Mar 2022 at 19:13, Patrik Schindler <poc@xxxxxxxxxx> wrote:

Hello Jerry,

Am 23.03.2022 um 13:36 schrieb jerry ven <jerryven95@xxxxxxxxx>:

TOSTMF('IFS PTH/desiredfile.csv')
To be completely unambiguous, an IFS path should always start with a /.

Otherwise, please more information, as asked by me, Vern, and others.

:wq! PoC



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.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-2026 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.