Re: Informix SPL SYSTEM Command Question
Posted in 1996
} From rmy.emory.edu!informix-list-owner@caig2.att.att.com Wed Aug 14 17:47:20 1996
} >Received: by cagw2.att.com; Wed Aug 14 17:45 EDT 1996
} From: ANISHA_VASWANI@HP-SanJose-om1.om.hp.com
} X-Openmail-Hops: 1
} Subject: Informix SPL SYSTEM Command Question
} To: informix-list@rmy.emory.edu
} Cc: VASWANI_ANISHA/HP-SanJose_om1@boi.hp.com
} Sender: informix-list-owner@rmy.emory.edu
} X-Informix-List-To: rajivp@qsun.ho.att.com
} X-Informix-List-Id: <list.11025>
} Content-Type: text
}
} Item Subject: cc:Mail Text
}
} Hi Informix Gurus,
}
} I'm struggling with the following problem and any tips would be
} greatly appreciated:
}
} Environment
} ===========
}
} OS: HP UX 10.X
} Informix Online Version: 7.12.UC1
} Informix 4GL Version: 6.02.UD1
}
} Problem
} =======
} I have a stored procedure that uses the SYSTEM Command to call a shell
} script which eventually calls a 4GL script. The problem is that this
} is not working anymore. I keep getting SQL Error -668 which is that a
} SYSTEM Command failed. The reason I said anymore is that it used to
} work before and it just stopped working and I'm not sure why. It gets
} even crazier -- I have the exact same setup on the test system and it
} works fine over there!
}
} So to find out what the problem was, I created a simple stored
} procedure that calls a shell script using the SYSTEM Command and all
} this shell script does, is echo a string to a debug file. This does
} not work! However, if I do the echo to the debug file directly from
} the stored procedure, it works just fine. I also tried the following:
} SYSTEM "fglgo script_name arg1 arg2 arg3 ..."
}
} i.e. execute the 4GL script directly from the stored procedure
} This also gives me the -668 error.
}
} Anyone have any explanations for this behaviour? Also, is anyone aware
} of any environment variables or issues that might be relevant? I ask
} this because the darn thing runs on one system with the identical
} setup and not that other!
}
} Extremely frustrated,
} Anisha
} anisha_vaswani@hp.com
}
}
}
Hi Anisha,
Question
--------
Can one give a script name with fglgo ?.
Have you tried it out with an absolute path in the SYSTEM command ?
i.e
SYSTEM "/usr/informix/bin/fglgo /the_4gl_path/4gl_executeable arg1 arg2 ..."
If this does not work try the foll.
SYSTEM "/the_script_path/sc.sh " || arg1 || " " || arg2 ..."
sc.sh
-----
#!/bin/sh
# VERY IMPORTANT to define all the env. variables that you are going to use
INFORMIXDIR=/usr/informixexport INFORMIXDIR
PATH=$INFORMIXDIR/bin:$PATHexport PATH
#define other variables that are reqd.
#call your 4GL
$INFORMIXDIR/bin/fglgo /the_4gl_path/4gl_executable $1 $2 ...
# End of Script
Also do check the premissions on all the executables and the scripts being
called.
--
Rajiv Jhaveri
DBA
=================================================================
Voice : (908) 949 7987 Pager : 544 7872 or
1-800 225 0256 PIN 310902
Fax : (908) 949 1726 E-mail: rajivp@qsun.ho.att.com
=================================================================