Hi Waldo,
I fear my reply will be long and I suspect it may easily be interpreted as condescending, or patronising, neither of which are intended. Also I write this not to “convince” you of any specific thing (use Clarion, don’t use Clarion, clearly it doesn’t affect me) but rather simply to help you to better understand what is going on.
The essence of what you posted comes up a fair bit in this, and other, forums. Programming as a career takes us down various paths with roads that both brig us in and take us away. Sometimes those roads circle back, and there’s a somewhat-steady stream of people who return after a decade or two of absence.
Of course in the time away the world has changed, and so returning to Clarion now may not be the same as the world you left Clarion in 30 years ago. Clarion itself has changed, both in ownership over the years, and also in the goals it has.
To fully appreciate this change it is helpful to recall the DOS CPD 2.1 days. At the time the product was helmed by Bruce Barrington, who had a specific vision and goal for the product. Being for DOS (which was a very limited OS) programs were also limited in their scope. The biggest problems were RAM availability and Printer codes. A networked computer was one that was on a LAN and had some sort of shared-file access. Program data was “silo’d” - only your program could access your data.
To avoid a long boring history lesson, if we contrast it with today, the landscape is very different. Today we are running on the windows desktop, or more commonly inside a web browser. Printers and RAM are (almost) non-issues, data is expected to be shared (via SQL or ODBC), programs easily communicate with each other via Web Services, and “networked” includes all kinds of things from email and ftp to web pages, maps, and endless other things. And that’s before we talk about the changes brought on by haardware changes - Threads, Global Memory and so on.
So ultimately programs have changed, and perhaps more importantly, as a result of that, the scope of programs created in Clarion have changed.
When I started in CPD the “scope” of a Clarion program was pretty fixed. “Embed points” were few, hand-code was rare, and one Clarion program was more or less exactly the same as the next. Basically the programs did “one thing” (browses / forms / reports) - but it made that one thing easy enough for non-programmers to deal with.
Today - especially with mature programs - while the Browse / Form / Report structure is still often there, that is the very starting point - perhaps 5% of the program. The last 20 years have been focused on “coding” - writing the thing that makes your program special, or different from the rest.
When Bruce Barrington retired the funding model for Clarion changed, and when Topspeed dissolved and SoftVelocity was born it changed again. Each change has brought about a decrease in overall funding to the main product. It turns out writing developer tools is not terribly profitable because developers are both cheap, and think they could do better themselves. that Clarion still exists as a product is the amazing part, given that more-or-less none of it contemporaries still exist.
I suppose my point is this; In the DOS days Clarion was a tool - something you used. Today Clarion is a programming environment - in which you program. The focus is much more on writing, or including, code, than it is on specific “tasks”. It’s also massively extensible, so it’s probably not a surprise that over the last 2 decades lots of people have made (and in some cases) sold extensions. (Of course I am one of those people.)
For commercial developers, many people see the economic benefit in extensions (it’s cheaper than paying an employee, or writing something yourself) others prefer the challenge of writing it themselves. For hobbiest programmers, with limited budgets, especially ones returning to Clarion, there is both a LOT to write, and a LOT to learn. Once upon a time the “Clarion in a box” was all you needed to do everything. But the scope of everything has changed, and that is no longer a realistic approach.
To return you your note above - you asked a question, and got several different approaches. I think you were hoping for a “convert CSV to TPS” button in the IDE - alas that simply does not exist. Neither does a XML to TPS, or JSON to TPS or EDI to TPS or any of a dozen other file formats that might be considered common.
You do of course have (as mentioned) lots of ways to do this task - from a BASIC driver file, and PROCESS template, to using SQL as an external tool to do the task, to writing code with StringTheory or even just simple Clarion code to read and write records. None of these are the “right” way, none of them are the “have to” way - they are just a few of the many approaches you could take.
I think this line of yours sums it up best;
No matter what file format needs converted, there should be a better way to manipulate it within the Clarion program,
I think you are seeing Clarion as an ETL type program here - whereas it’s really not that - it’s a programming environment. So most things you do with it will be programming.
I say all this not to convince you that you are wrong, but perhaps to suggest you are looking in the wrong place for the functionality you are looking for. An ETL program may be a better fit for what you have in mind…