Am 12.09.2016 um 16:24 schrieb Norbert Friemel:
On Mon, 12 Sep 2016 09:05:29 -0500, John McKown wrote:
We are running z/OS 1.12 on a z9BC. We have COBOL 3.4. Neither will ever be
upgraded. We will not obtain new hardware or software. Given the absolute
truth of the preceding :-( does anybody know a better way to convert a CSV
file, coming in from a UNIX box, to a "normal" sequential file with fixed
length character fields. At present we use the UNSTRING verb to do this. We
get these files daily and they are 100s of thousands to a bit over a
million records. This takes a while, both wall clock and CPU wise. Oh,
these actually use the pipe symbol, | (0x4F) and not a comma, if that is of
any relevance. Please don't suggest HLASM because our programming staff
(two people) basically knows only two languages: COBOL and CA-EasyTrieve.
DFSORT (PARSE):
http://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.iceg200/ice2cg_Using__nnn___nn_and__n_Parsed_Fields_with_BUILD_and_OVERLAY.htm
Norbert Friemel
That's what I thought, too - it's utility business.
If you don't get it fixed using DFSORT, maybe you could talk
with the Unix people; there should be tools on Unix
which can do this, too.
Or, still better: modify the producing process so that it writes
fix lengths from the start; it can keep the delimiters, if needed,
then it is still valid CSV format. You then only have to check that
the delimiters are on the same columns, always; but the data
can be processed by the COBOL program directly.
Of course, this will only work, if you can talk with the other side
and they will do some modifications for you.
Kind regards
Bernd
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN