Running an AS/400 CL program via ODBC
Simon Brunning
SBrunning at trisystems.co.uk
Tue Jun 5 04:33:05 EDT 2001
More information about the Python-list mailing list
Tue Jun 5 04:33:05 EDT 2001
- Previous message (by thread): Running an AS/400 CL program via ODBC
- Next message (by thread): Running an AS/400 CL program via ODBC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> From: Aaron Fransen [SMTP:aaronf at nospam.telusplanet.net] > I have a problem executing an AS/400 CL program from the SQL/ODBC > interface > in Python. I know the interface on the AS/400 works because I actually > wrote > the code to do it originally in VB, which has been live on our web site > for > months. I'm getting sick of the Really Big Visual Basic Corporation > though, > and am in the process of converting the site to Python, which seemed to me > to be about the best/easiest/really cool tools out there. > > I can run any SQL query via the ODBC 2 interface (Python 2.1) using the > following code: > > dbc=odbc.odbc("datasourcename/as400username/password") > cursor=dbc.cursor() > cursor.execute("Select * from MYTABLE") > result=cursor.fetchall() > > Works perfectly. However, if I try something like this: > > cursor.execute("{{Call > LIB.PROGNAME(?,?,?,?,?,?)}}",['PARM1','TWO','THREE','1','','']) > > it bakes with "SQL0204 - PROGNAME in LIB type *N not found. in EXEC". > > Thoughts? Is the user ID that you are using authorised to the program? Are there any exit programs on your system which could be blocking access? Have you tried the LIB/PGM naming convention? Anything else in the job log? Cheers, Simon Brunning TriSystems Ltd. sbrunning at trisystems.co.uk ----------------------------------------------------------------------- The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot accept liability for statements made which are clearly the senders own.
- Previous message (by thread): Running an AS/400 CL program via ODBC
- Next message (by thread): Running an AS/400 CL program via ODBC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list