Re: Spam Alert: Passing a value from Unix into 4GL ?
Posted in 2004
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C43E52.36BD1BE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Actually , as far as I know it is not possible.=20 You can simulate it by writing the result in a file or database and then read it back in 4GL . I would love in 4GL the backticks that I can use in Perl and Shell = Script for returning values from system's commands. To do List in the next 4GL Version ? Regards ----- Original Message -----=20 From: Dirk Moolman=20 To: informix-list@iiug.org=20 Sent: Thursday, May 20, 2004 9:56 AM Subject: Spam Alert: Passing a value from Unix into 4GL ? I am searching the net, but can't find an answer yet. =20 How can I run a 4GL, that will run a Unix command, and then keep the result of the Unix command in a variable in the 4GL ? Example: =20 Let's say I have a script that does a word count (wc) on a file. I want to run this script from a 4GL program, and then use the result of the word count in the 4GL. Should be simple, but I don't know how ... Dirk Moolman Database and Unix Administrator MXGROUP "People demand freedom of speech as a compensation for the freedom of = thought which they seldom use."=20 -Kierkegaard=20 -------------------------------------------------------------------------= ----- << ella for Spam Control >> has removed 976 Spam messages and = set aside 515 Newsletters for me You can use it too - and it's FREE! www.ellaforspam.com=20 ------=_NextPart_000_0021_01C43E52.36BD1BE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> <STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 77.95pt 1.0in = 77.95pt; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline } A:visited { COLOR: purple; TEXT-DECORATION: underline } SPAN.MsoHyperlinkFollowed { COLOR: purple; TEXT-DECORATION: underline } P.MsoPlainText { FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New" } LI.MsoPlainText { FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New" } DIV.MsoPlainText { FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New" } DIV.Section1 { page: Section1 } </STYLE> </HEAD> <BODY lang=3DEN-US vLink=3Dpurple link=3Dblue bgColor=3D#ffffff> <DIV><FONT face=3DTahoma size=3D2>Actually , as far as I know it is not = possible.=20 </FONT></DIV> <DIV><FONT face=3DTahoma size=3D2>You can simulate it by writing the = result in a=20 file or database</FONT></DIV> <DIV><FONT face=3DTahoma size=3D2>and then read it back in 4GL = .</FONT></DIV> <DIV><FONT face=3DTahoma size=3D2></FONT> </DIV> <DIV><FONT face=3DTahoma size=3D2>I would love in 4GL the backticks that = I can use=20 in Perl and Shell Script for returning values from system's=20 commands.</FONT></DIV> <DIV><FONT face=3DTahoma size=3D2>To do List in the next 4GL Version = ?</FONT></DIV> <DIV><FONT face=3DTahoma size=3D2></FONT> </DIV> <DIV><FONT face=3DTahoma size=3D2>Regards</FONT></DIV> <DIV><FONT face=3DTahoma size=3D2></FONT> </DIV> <BLOCKQUOTE=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3DDirkM@mxgroup.co.za = href=3D"mailto:DirkM@mxgroup.co.za">Dirk=20 Moolman</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3Dinformix-list@iiug.org=20 href=3D"mailto:informix-list@iiug.org">informix-list@iiug.org</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, May 20, 2004 = 9:56=20 AM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Spam Alert: Passing a = value from=20 Unix into 4GL ?</DIV> <DIV><BR></DIV> <DIV class=3DSection1> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">I am searching the net, but can't find an = answer=20 yet. </SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt"></SPAN></FONT> </P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">How can I run a 4GL, that will run a Unix = command, and=20 then keep</SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">the result of the Unix command in a variable = in the=20 4GL ?</SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt"></SPAN></FONT> </P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt"></SPAN></FONT> </P> <P class=3DMsoPlainText><U><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">Example: </SPAN></FONT></U></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt"></SPAN></FONT> </P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">Let's say I have a script that does a word = count (wc)=20 on a file.</SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">I want to run this script from a 4GL = program, and then=20 use the result</SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">of the word count in the = 4GL.</SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt"></SPAN></FONT> </P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt">Should be simple, but I don't know how=20 ...</SPAN></FONT></P> <P class=3DMsoPlainText><FONT face=3D"Courier New" size
Francisco Roldan wrote: > > This is a multi-part message in MIME format. > > ------=_NextPart_000_0021_01C43E52.36BD1BE0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Actually , as far as I know it is not possible.=20 > You can simulate it by writing the result in a file or database > and then read it back in 4GL . > > I would love in 4GL the backticks that I can use in Perl and Shell = > Script for returning values from system's commands. > To do List in the next 4GL Version ? > > Regards > > ----- Original Message -----=20 > From: Dirk Moolman=20 > To: informix-list@iiug.org=20 > Sent: Thursday, May 20, 2004 9:56 AM > Subject: Spam Alert: Passing a value from Unix into 4GL ? > > > I am searching the net, but can't find an answer yet. =20 > > > > How can I run a 4GL, that will run a Unix command, and then keep > > the result of the Unix command in a variable in the 4GL ? > > > > > > Example: =20 > > > > Let's say I have a script that does a word count (wc) on a file. > > I want to run this script from a 4GL program, and then use the result > > of the word count in the 4GL. > > > > Should be simple, but I don't know how ... Is can do with number, divide answer with 256 and exit with number this to 4GL PROGRAMM. In 4gl you can then RUN "programm" RETURNING ineteger Is cannot do with other data. -- Enor
Related threads
- Conversion to differeent characters sets
- Problem in changing locale via dbexport/dbimport
- RE: openlink error "Unable to load locale categories"