Number of records of a subfile in Qdesgin/UNIX?

Guy Werry guy.werry at hbms.ca
Thu Sep 20 10:22:46 CDT 2007


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.
We do something similar with many of our reports.
 
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).
2) In your Quick screen, RUN COMMAND "more FRED.txt" CLEAR SCREEN RESPONSE
 
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).  The Quck screen will use the more utility to report the contents of FRED.txt on your screen.  Life is wonderful!
 
Guy L. Werry
Senior Systems Analyst
Hudson Bay Mining & Smelting Co., Limited. 


________________________________

From: powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com [mailto:powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com] On Behalf Of Daniel Rodríguez
Sent: Thursday, September 20, 2007 10:10 AM
To: Franck LERAY
Cc: powerh-l at lists.sowder.com
Subject: Re: Number of records of a subfile in Qdesgin/UNIX?


Hi,

I think we don't have a C compiler installed in the news HP9000... I will see... 

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... 

Thank you,

Daniel


2007/9/20, Franck LERAY <franck.leray at cheops.fr >: 

	Hi Daniel,

	 

	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.

	 

	Franck.

	 

	 

	
________________________________


	De : Daniel Rodríguez [mailto:reasegurator at gmail.com] 
	Envoyé : jeudi 20 septembre 2007 13:45
	À : Franck LERAY
	Cc : powerh-l at lists.sowder.com
	Objet : Re: Number of records of a subfile in Qdesgin/UNIX?

	 

	Hi Frank,
	
	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.
	
	I will try with the DO EXTERNAL option calling a Unix shell script. 
	
	Merci beaucoup pour l'aide, Frank! Je suis spagnol et écrire en anglais est aussi trés compliqué pour moi.
	
	Daniel Rodriguez,
	
	
	
	

	2007/9/20, Franck LERAY <franck.leray at cheops.fr>:

	On unix box, you can't use the same method.

	 

	2 problems

	First

	You can't use do command statement, a variable set by a soon process is not visible from the parent process.

	You have to do an external subroutine (callable by the do external command).

	 

	Second 

	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.

	You have to do a unix script. This script will use the qshow command. This command will return the number of records.

	 

	Hope this help (excuse my poor English....)

	Franck.

	 

	 

	
	--
	= = = = = = = = = = = = = = = = = = = = = = = = = = = =
	Mailing list: powerh-l at lists.sowder.com
	Subscribe: &quot;subscribe&quot; in message body to powerh-l-request at lists.sowder.com
	Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in message body to powerh-l-request at lists.sowder.com
	http://lists.sowder.com/mailman/listinfo/powerh-l
	This list is closed, thus to post to the list you must be a subscriber.
	Add 'site: lists.sowder.com <http://lists.sowder.com>  powerh-l' to your search terms to search the list archive at Google.

	 



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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20070920/01b847c4/attachment.htm


More information about the powerh-l mailing list