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



Jon,

I believe you did this as a June 2016 article. I will take a look at the %scanrpl option.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Thursday, December 29, 2016 11:16 AM
To: Midrange-L Midrange-l <midrange-l@xxxxxxxxxxxx>
Subject: Re: merging 2 .csv files

I honestly don't recall Mike - As to the period restriction can you not find another character that is accepted and the do a %scanrpl on the name?


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Dec 29, 2016, at 9:40 AM, Smith, Mike <Mike_Smith@xxxxxxxxxxxxxxxx> wrote:

Thanks Jon,

I'll try to work my way through your suggestion.

I'm probably reading your last suggestion wrong, but didn't you
already create a handler for 'Long names' . This was the route I was
going to take, but I don't think I can have a period in the Long name

Mike


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Jon Paris
Sent: Thursday, December 29, 2016 9:30 AM
To: Midrange-L Midrange-l <midrange-l@xxxxxxxxxxxx>
Subject: Re: merging 2 .csv files

If you look at the code for my csv input handler I think I implemented a scheme that used an array lookup to allow the column headings to dictate the sequence of the data if it did not match the layout of the "file" you wanted. That approach could be used here.

The most versatile way to handle this would be to have a twinned array of column name and corresponding heading name passed in as the part of the user parameter and then using a first time switch to build an output the corresponding set of column headings.

So the basic flow just becomes:

For each field in the record:

First record?
Lookup column name and add corresponding column header and comma to the heading buffer.

Add column data and comma to the record buffer.

All fields processed?
First record?
Output heading buffer
Set first record flag off
Output buffer followed by line end.

Been meaning to write this up for a while - maybe I'll get round to it now!

Another option - probably not for you - might be to add long names (i.e. the column headings) to the record template file (i.e.the one used in the program) then use the sys tables to retrieve the matching names instead of an array lookup.

Hope this helps.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Dec 29, 2016, at 9:00 AM, Smith, Mike <Mike_Smith@xxxxxxxxxxxxxxxx> wrote:

I have been away for a couple of days, but it looks like I need to take a look at something like this, however the link to the file on IPRODEVELOPER doesn't work. Do you have access to this, that you could provide me?

Maybe there is a simpler solution for what I need to do.

I'm creating a .CSV file using an ifs open access hander from Jon Paris, however the headings are an issue due to requirements from the vendor.
For example headings may be something like "Customer.TelephoneNumber"
I don't believe there is a way for me to make a field name like this, so I was trying to get around it, but placing the Heading values in a file, and create a .csv and then merge the 2.

Any thoughts?

Mike

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of JRusling@xxxxxxxxxxx
Sent: Tuesday, December 27, 2016 10:11 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: merging 2 .csv files

I like Scotts ADDTOR4 solution.

http://iprodeveloper.com/print/rpg-programming/append-records-one-ifs
-
file-another
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: http://amzn.to/2dEadiD

NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: http://amzn.to/2dEadiD

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

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

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

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.

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.