David,

I would create a procedure to parse the string.

Input the string and separator character, return a DS with the fields.

Make the DS large enough (enough subfields) so that it can be re-used for other files as well.

Best regards,


Peter Colpaert
Software Engineer, Consumer Luminaires
Industrieterrein Satenrozen 11, 2550 Kontich, Belgium
Tel. +32/ 3 450 74 09, Fax +32/ 3 450 74 33, Internal 1317
peter.colpaert@xxxxxxxxxxx, www.philips.com

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: dinsdag 24 november 2009 14:23
To: Midrange Systems Technical Discussion
Subject: Copy variable to PF

Hi,

A coworker asks :

For a neat way to do this :

Copier the variable MyVar= 'Abcd;cdef;ghijk;12345678aa;'

To a physical file so :

FIELD1 FIELD2 FIELD3 FIELD4
Abcd cdef ghijk 12345678aa

There are a fixed number of fields, but with varying lengths separated
by semi-colons.

Thanks.
--


The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original 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.