ksh: syntax error at line 1 : `(' unexpected
Posted in 2009
A user on Tru64 running an Informix 4GL batch executable (.4ge) under IDS 10.00.FC8 kept seeing "ksh: syntax error at line 1 : `(' unexpected" on the console, though the program carried on running. Respondents pointed out the message comes from the Korn shell, not Informix or 4GL, and is caused by a shell script/command containing an unexpected '(' — likely the wrapper script that launches the .4ge or a RUN statement inside the 4GL code. Suggestions included checking the file type with 'file', trying a different shell, and using 'set -x' to trace. The poster never posted the script, so no resolution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Stored Procedures & SPL
what causes this? I'm running a batch program with no displays and that messages keeps getting displayed on the command line without aborting the program which just keeps on processing... IBM Informix Dynamic Server Version 10.00.FC8
Indigestion? Come on! You have to give us SOMETHING to go on. How about posting: Platform What front-end are you using? Post the scrpt itself. Something? Art On Thu, Feb 12, 2009 at 12:23 AM, THEUNS VAN ONSELEN <vanons_t@mtn.co.za>wrote: > what causes this? I'm running a batch program with no displays and that > messages keeps getting displayed on the command line without aborting the > program which just keeps on processing... > > IBM Informix Dynamic Server Version 10.00.FC8 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. --0016e645a3dc5b09340462b712ef
platform: true64 front-end: (not sure what you mean by front end, using a telnet session to run the batch program that fetches and saves data on the command line) script: no script, running a batch program, Informix 4gl executable, 4ge something else? ------WebKitFormBoundaryAAFrAA6YAA23AA+a
Try execuiting the program with a different shell such as korn, not bourne, etc.
As your Subject implies, there's something ksh (aka korn shell) is objecting about the first line of some file you are trying to run. If you have your_program.4ge in your current working directory, and there is no other file named your_program.4ge, and your current working directory is in your PATH, then you can try to run it with your_program.4ge. If this command (i.e. your_program.4ge) is causing error you named, then there's somehing wrong with your your_program.4ge - hint: run command "file your_program.4ge" and see what it returns. Error which you posted in subject is from ksh and list of ksh (or any other shell) commands in the file is called script. HTH Hrvoje THEUNS VAN .... wrote: platform: true64 front-end: (not sure what you mean by front end, using a telnet session to run the batch program that fetches and saves data on the command line) script: no script, running a batch program, Informix 4gl executable, 4ge something else? ------WebKitFormBoundaryAAFrAA6YAA23AA+a ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Maybe also try doing "set -x" before running the program? Don't know it will work on your platform, but it can help illuminate issues in scripts (as others have pointed out your environment or your 4gl program is doing something with korn shell (ksh) either before the program or in it)... THEUNS VAN .... wrote: platform: true64 front-end: (not sure what you mean by front end, using a telnet session to run the batch program that fetches and saves data on the command line) script: no script, running a batch program, Informix 4gl executable, 4ge something else?
I ask about script because the message you only partially posted in the subject is from ksh and is complaining about an odd left parenthesis in a script it is being asked to execute. This message is NOT coming from Informix nor from your 4GL but probably from the batch script that executes the .4ge itself. If you can't debug it yourself, post the batch script and we'll look at it. Art On Thu, Feb 12, 2009 at 7:22 AM, VAN .... <THEUNS> wrote: > platform: true64 > > front-end: (not sure what you mean by front end, using a telnet session to > run > the batch program that fetches and saves data on the command line) > > script: no script, running a batch program, Informix 4gl executable, 4ge > > something else? > ------WebKitFormBoundaryAAFrAA6YAA23AA+a > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. --0016e6434492b177650462b9af9d
Hi Theuns, Apart from the script that executes the batch program, you can also check your 4gl for any 'run' statements. This may also cause the problem Regards Mark -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Art Kagel Sent: 12 February 2009 04:39 PM To: ids@iiug.org Subject: Re: ksh: syntax error at line 1 : `(' unexpect.... [14862] I ask about script because the message you only partially posted in the subject is from ksh and is complaining about an odd left parenthesis in a script it is being asked to execute. This message is NOT coming from Informix nor from your 4GL but probably from the batch script that executes the .4ge itself. If you can't debug it yourself, post the batch script and we'll look at it. Art On Thu, Feb 12, 2009 at 7:22 AM, VAN .... <THEUNS> wrote: > platform: true64 > > front-end: (not sure what you mean by front end, using a telnet session to > run > the batch program that fetches and saves data on the command line) > > script: no script, running a batch program, Informix 4gl executable, 4ge > > something else? > ------WebKitFormBoundaryAAFrAA6YAA23AA+a > > > > **************************************************************************** *** > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. --0016e6434492b177650462b9af9d **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum. ================== Please read our Email Disclaimer : http://www.thefuelgroup.com/disclaimer.html