IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

python on z/OS error no encoding declared


IBM Mainframe Forums -> Testing & Performance
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Fabiana Bordacchini Della

New User


Joined: 28 Jun 2024
Posts: 1
Location: ITALY

PostPosted: Thu Jun 19, 2025 2:35 pm
Reply with quote

Hi, I'm trying to write a python script under z/OS, using IBM Open Enterprise SDK for Python 3.13.

I wrote the code under TSO OMVS and I got the following error:

SyntaxError: Non-UTF-8 code starting with 'çx97' in file /u/u0n6758/prova5.py on line 1, but no encoding declared; see peps.python.org/pep-0263/ for details

In the text there some # and {}.
If I change the # in £ and delete the {} the code is working. The problem is that I need the {} (I have to deal with json).
And I would not like to change special character on my script (the script was written on a Linux machine and there is working properly - I need to have on USS now).

I've tried to put in the second line the enconding, using both IBM1047 than UTF-8 ma it didin't work. I'm not sure about the encoding statement syntax on z/OS.

Can anyone please me help me? where can I find documentation about syntax python under z/OS?

Thanks everybody,
have a nice day, Fabiana
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Testing & Performance

 


Similar Topics
Topic Forum Replies
No new posts IEW2315E 1369 Link error All Other Mainframe Topics 3
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Error to invoke MPP program through B... IMS DB/DC 4
No new posts PKZIP error ZPFM121E and ZPCE009E JCL & VSAM 6
Search our Forums:


Back to Top