You can use noxDb - it is open source, it just a service program you binds
to :

Look at this example:

https://github.com/sitemule/noxDB/blob/master/examples/JSONPARS23.JSON-write-XML-JSON-and-CSV.rpgle




On Tue, May 27, 2025 at 11:01 PM Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

A Long time ago, I used Scott's IFS eBook to create my own IFS Service
program to Open, Write, Close etc.

fileDescriptor = Ifs_OpenFile(path&filename :CCSID)
Ifs_WriteToFile(fileDescriptor:Data) **this adds CRLF
Ifs_CloseFile(fileDescriptor)
Ifs_DeleteFile(path&filename)

I just load everything into a Data Structure and then build the text
string using a delimiter (comma, pipe, tab, etc).
I use these procedures for all kinds of things.

Would be nice to do it with DATA-INTO. I'm fairly certain Scott did a
CSVINTO or something like that.

HTH,
Greg

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of gio.cot
via RPG400-L
Sent: Saturday, May 24, 2025 4:39 PM
To: 'RPG programming on IBM i' <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: [EXTERNAL] How generate a Multiformat Csv file tab delimeted

Hi All

I would need to generate a Multiformat Csv file tab delimeted (with RPG
or CLLE) ..

The CSV file have a record type (Ex. 01 Header 02 Details)

Ex.

Type record (01) customer code (0001 ) customer name (Acme Inc) invoice
number (12345) invoice date (2025/05/20)

Type record (02) Item number (AA01) item description (aaaaaaaa) item qty
(12,02)

Type record (02) Item number (BB01) item description (BBBBBBB) item qty
(33,20)



Any suggestions



Thanks in advance



Gio



--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

[CAUTION! This email originated outside of the organization. Please do not
open attachments or click links from an unknown or suspicious origin.]

Greg Wilburn
Director of IT
301.895.3792 ext. 1231
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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-2025 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.