<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007>Ok, we have a subfile, a portable one, on HP-Ux and we 
need to know how many records, then display that in a Quick 
screen.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007>We do something similar with many of our 
reports.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007>1) Write a Quiz report that will report the number of 
records, with REPORT DEVICE DISC NAME (name to be chosen, use "FRED" as an 
example).</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007>2) In your Quick screen, RUN COMMAND "more FRED.txt" 
CLEAR SCREEN RESPONSE</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007>So, the disc file FRED.txt will have Quiz's report of 
how many records it read (yes, a bit slower than wc -l, but life's not 
perfect).&nbsp; The Quck screen will use the more utility to report the contents 
of FRED.txt on your screen.&nbsp; Life is wonderful!</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=807381615-20092007>
<P><FONT size=2>Guy L. Werry<BR>Senior Systems Analyst<BR>Hudson Bay Mining 
&amp; Smelting Co., Limited. </FONT></P></SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
powerh-l-bounces+guy.werry=hbms.ca@lists.sowder.com 
[mailto:powerh-l-bounces+guy.werry=hbms.ca@lists.sowder.com] <B>On Behalf Of 
</B>Daniel Rodríguez<BR><B>Sent:</B> Thursday, September 20, 2007 10:10 
AM<BR><B>To:</B> Franck LERAY<BR><B>Cc:</B> 
powerh-l@lists.sowder.com<BR><B>Subject:</B> Re: Number of records of a subfile 
in Qdesgin/UNIX?<BR></FONT><BR></DIV>
<DIV></DIV>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 &lt;<A 
onclick="return top.js.OpenExtLink(window,event,this)" 
href="mailto:franck.leray@cheops.fr" target=_blank>franck.leray@cheops.fr 
</A>&gt;:</SPAN>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
  <DIV lang=FR vlink="blue" link="blue">
  <DIV>
  <P><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi 
  Daniel,</SPAN></FONT></P>
  <P><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">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 face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Franck.</SPAN></FONT></P>
  <P><FONT face=Arial color=navy size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <DIV>
  <P><FONT face="Times New Roman" size=3><SPAN lang=EN-GB 
  style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</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 width="100%" SIZE=2>
  </SPAN></FONT></DIV>
  <P><B><FONT face=Tahoma size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">De&nbsp;:</SPAN></FONT></B><FONT 
  face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Daniel 
  Rodríguez [mailto:<A onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:reasegurator@gmail.com" target=_blank>reasegurator@gmail.com</A>] 
  <BR><B><SPAN style="FONT-WEIGHT: bold">Envoyé&nbsp;:</SPAN></B> jeudi 20 
  septembre 2007 13:45<BR><B><SPAN style="FONT-WEIGHT: bold">À&nbsp;:</SPAN></B> 
  Franck LERAY<BR><B><SPAN style="FONT-WEIGHT: bold">Cc&nbsp;:</SPAN></B> <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:powerh-l@lists.sowder.com" 
  target=_blank>powerh-l@lists.sowder.com</A><BR><B><SPAN 
  style="FONT-WEIGHT: bold">Objet&nbsp;:</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>&nbsp;</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 &lt;<A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:franck.leray@cheops.fr" 
  target=_blank>franck.leray@cheops.fr</A>&gt;:</SPAN></FONT></SPAN></P>
  <DIV vlink="purple" link="blue">
  <DIV>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">On unix box, you can't use the 
  same method.</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">2 problems</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">First</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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 lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">You have to do an external 
  subroutine (callable by the do external command).</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Second </SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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 lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">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 lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hope this help (excuse my poor 
  English….)</SPAN></FONT></P>
  <P><FONT face=Arial size=2><SPAN lang=EN-GB 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Franck.</SPAN></FONT></P>
  <P><FONT face="Times New Roman" size=3><SPAN lang=EN-GB 
  style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>
  <P><FONT face="Times New Roman" size=3><SPAN lang=EN-GB 
  style="FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P></DIV></DIV>
  <P><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><BR>--<BR>= = = = = = = = = = = = = = = = = = = = = = 
  = = = = = =<BR>Mailing list: <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:powerh-l@lists.sowder.com" 
  target=_blank>powerh-l@lists.sowder.com</A><BR>Subscribe: 
  &amp;quot;subscribe&amp;quot; in message body to <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:powerh-l-request@lists.sowder.com" 
  target=_blank>powerh-l-request@lists.sowder.com</A><BR>Unsubscribe: 
  &amp;quot;unsubscribe &amp;lt;password&amp;gt;&amp;quot; in message body to <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="mailto:powerh-l-request@lists.sowder.com" 
  target=_blank>powerh-l-request@lists.sowder.com</A><BR><A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://lists.sowder.com/mailman/listinfo/powerh-l" 
  target=_blank>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 onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://lists.sowder.com" target=_blank> 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>&nbsp;</P></SPAN></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR>The information in this e-mail and any attachments is confidential and may be subject to legal professional privilege. It is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or person responsible for delivering this information to the intended recipient, please notify the sender immediately. Unless you are the intended recipient or his/her representative you are not authorised to, and must not, read, copy, distribute, use or retain this message or any part of it.
</BODY></HTML>