Running UNIX Command In Informix 4GL
Posted in 2006
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, I would like to know that how we can run a UNIX commands and capture there return values in Informix 4GL. Suppose I want File comparision command like cmp to check in 4GL & capture a result which is 0 means both are equal in some variable , how would i do this? Else, the UNIX Command which returns last line of file & i would like to capture/save this line in Informix Variable. Please give me solution. Thanks Samruddhi
samruddhiv@gmail.com wrote: > Hi, > > I would like to know that how we can run a UNIX commands and capture > there return values in Informix 4GL. > > Suppose I want File comparision command like cmp to check in 4GL & > capture a result which is 0 means both are equal in some variable , how > would i do this? > > Else, the UNIX Command which returns last line of file & i would like > to capture/save this line in Informix Variable. > > Please give me solution. > > Thanks > Samruddhi have a look at fglio.sh.Z (another quality product from yours truly) at the IIUG software archives -- Ciao, Marco ______________________________________________________________________________ Marco Greco /UK /IBM Standard disclaimers apply! Structured Query Scripting Language http://www.4glworks.com/sqsl.htm 4glworks http://www.4glworks.com Informix on Linux http://www.4glworks.com/ifmxlinux.htm
Try using the RUN statement, it's in the 4GL manual online. i.e. run "ls -l /etc" returning rc Good luck, Brian >I would like to know that how we can run a UNIX commands and capture >there return values in Informix 4GL. _______________________________________________ ________________________________________________________________________ Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.