On Thu, 4 Aug 2022 08:46:39 +0100, Colin Paice wrote:
>
>My real mission is to be able to extend Python as it cannot currently open
>a data set with open("DD:SYSIN...) etc
>I want a Python program to be able to read any file supported by the C
>fread() or fgets().
>
I don't understand how this is relevant to "Subject: reading an ascii file",
unless you nave a Classic data set containing ASCII data.
I habitually mention the risk of relying on undocumented support by utilities of
//DSN and //DD:. RFCs or RFEs might be appropriate. Or, in the distant future,
DSFS:
<https://www.ibm.com/docs/en/zos/2.5.0?topic=zos-data-set-file-system-dsfs>.
>If I display the file information.
>
>*ls -THE z.py t
>ISO8859-1 T=on -rwxr-xr-x --s- ---- 1 OMVSKERN 1000 824 Aug
> 1 11:47 z.py chtag -p z.py
> t ISO8859-1 T=on z.py *
>
What is the implied tagging of Classic data sets?
>Q:Is autoconversion enabled at either creation or reading? :
>A:I do not think it is relevant - I want to be able to read any file
>
>>I'm thinking I'll have to read a big chunk from the file, convert ASCII to
>>EBCDIC, and search for x15 to split the line up
>>
>Q:Shouldn't be necessary. just iconv -f ISO8859-1 -t IBM-1047 file
>A: I need to read it - real time.
>
Pipes might be your friend here. Would a Rexx (or C) wrapper help?
>Q:Is UTF-8 in the game?
>A: Good question - I hadn't thought of that. That could be Version 2 of
>the program
On Thu, 4 Aug 2022 11:16:42 +0100, Colin Paice wrote:
>I found the _BPXK_AUTOCVT="ON" is available in OMVS and makes a difference.
--
gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN