I think the explanation can be found in the "C/C++ Programming 
Guide", in the chapter about "Using ASA text files" (Chapter 7 in the 
recent editions).

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/DOCNUM/SC09-
4765

After reading the chapter, I understand it to mean that when C/C++ 
programs (such as "cp" I presume) read an ASA file for text processing 
(rather than binary processing), they don't receive the ASA characters.

The ASA characters are interpreted and removed, before the program 
receives the text, and what the program receives is the interpreted 
text, in which a line preceding one that had an ASA '1' is terminated not 
by '\n' but by '\f' (a formfeed, hex 0C I presume).

Lines preceding those that had an ASA "space" are terminated by a '\n'.

If the ASA file had any ASA '+' lines (not likely in IDCAMS), the line 
preceding it would end with '\r' instead of '\n'.

If the ASA file had any ASA '0' or '-' lines, the line preceding it would be 
followed by 1 or 2 empty lines respectively, which the program would 
receive before it got the line that originally had the '0' or '-'.

I suspect that the lines that appear to have the ASA '1' lines appended 
to the preceding line, minus the '1', contain a formfeed where the '1' 
was, and no newline preceding it.

In the chapter I mentioned, it says:
"Records are terminated by writing a new-line ('\n'), carriage return 
('\r'), or form feed ('\f') character."

So a newline is not the only record terminator.

If you use "cat -v" to display the unix file, a formfeed would show 
as "^L".

If there is a formfeed there, one solution would be to use:
 tr '\f' '\n'
to change the formfeeds to newlines.

Bill

On Sat, 1 May 2010 00:58:41 +1000, Shane Ginnane wrote:

>cp //"'..'" /tmp/file.txt
>and/or cat //"'..'" > /tmp/file.txt
>
>Worked fine for VB input, not VBA. Hence my confusion.
>
>Shane ...
>
>On Sat, May 1st, 2010 at 12:46 AM, "Hunkeler Peter (KIUP 4)" wrote:
>
>> > [snip]A GENER of the files to VB prior to sending them to
>> > OMVS indeed confirmed this is what was happening.
>> >
>> > Anyone else seen this - or got an explanation ?. gil maybe ... ?
>>
>>
>> How did you move the OFILE to the filesystem?
>
>----------------------------------------------------------------------
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to [email protected] with the message: GET IBM-
MAIN INFO
>Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to