Hi,<br><br>I think we don't have a C compiler installed in the news HP9000... I will see... <br><br>If not, maybe I can write the result of the 'wc -l' into a file, convert it to a fixed length and read it as a subfile... it's just an idea...
<br><br>Thank you,<br><br>Daniel<br><br><div><span class="gmail_quote">2007/9/20, Franck LERAY <<a href="mailto:franck.leray@cheops.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">franck.leray@cheops.fr
</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="blue" lang="FR">
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Hi Daniel,</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">You need to make a script
which displays the number of records and a c stub. The c program return the
number of records to the quick program. We use this feature in differents cases
and use popen to call the script shell in the c program.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Franck.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN-GB"> </span></font></p>
</div>
<div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="2" width="100%">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">De :</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Daniel Rodríguez
[mailto:<a href="mailto:reasegurator@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">reasegurator@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Envoyé :</span></b> jeudi 20 septembre
2007 13:45<br>
<b><span style="font-weight: bold;">À :</span></b> Franck
LERAY<br>
<b><span style="font-weight: bold;">Cc :</span></b> <a href="mailto:powerh-l@lists.sowder.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">powerh-l@lists.sowder.com</a><br>
<b><span style="font-weight: bold;">Objet :</span></b> Re: Number of records
of a subfile in Qdesgin/UNIX?</span></font></p>
</div><div><span>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi Frank,<br>
<br>
We use these portable subfiles to export it to SAP, Streamserve, excel and
other aplicactions and we write the carriage return in each line of the
subfile, so the command 'wc -l' works properly.<br>
<br>
I will try with the DO EXTERNAL option calling a Unix shell script. <br>
<br>
Merci beaucoup pour l'aide, Frank! Je suis spagnol et écrire en anglais est
aussi trés compliqué pour moi.<br>
<br>
Daniel Rodriguez,<br>
<br>
<br>
<br>
</span></font></p>
<div>
<p><span><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2007/9/20, Franck LERAY
<<a href="mailto:franck.leray@cheops.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">franck.leray@cheops.fr</a>>:</span></font></span></p>
<div link="blue" vlink="purple">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">On unix box, you can't use the same method.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">2 problems</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">First</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">You can't use do command statement, a variable set by a soon process is
not visible from the parent process.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">You have to do an external subroutine (callable by the do external
command).</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Second </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">The "wc –l" command will not work like on 3k platform
because on unix there's no carriage return in the subfile. So the wc –l
command will not return the number of records.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">You have to do a unix script. This script will use the qshow command.
This command will return the number of records.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Hope this help (excuse my poor English….)</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Franck.</span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN-GB"> </span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN-GB"> </span></font></p>
</div>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
--<br>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =<br>
Mailing list: <a href="mailto:powerh-l@lists.sowder.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">powerh-l@lists.sowder.com</a><br>
Subscribe: &quot;subscribe&quot; in message body to <a href="mailto:powerh-l-request@lists.sowder.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">powerh-l-request@lists.sowder.com</a><br>
Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in
message body to <a href="mailto:powerh-l-request@lists.sowder.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">powerh-l-request@lists.sowder.com</a><br>
<a href="http://lists.sowder.com/mailman/listinfo/powerh-l" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.sowder.com/mailman/listinfo/powerh-l</a><br>
This list is closed, thus to post to the list you must be a subscriber.<br>
Add 'site:<a href="http://lists.sowder.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> lists.sowder.com</a>
powerh-l' to your search terms to search the list archive at Google.</span></font></p>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</span></div></div>
</div>
</blockquote></div><br>