Jim,

Using READ will work fine until you try it on a very large sequential file
and then you will run into "Memory Exceed" issues. Sometimes this will cause
a Layer type 11 fault and crash your session.

Regards,
Stewart
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, 22 June 2005 23:30
To: u2-users@listserver.u2ug.org
Subject: [U2] RE: Field Count from a Seq File


Thanks for all the suggestions.
I felt most comfortable with doing  a quick OPEN, a READ, followed by a
DCOUNT(REC,@FM) then a CLOSE F.FILE prior to the OPENSEQ.

The reason for this approach is that I wanted to know if the number of
READSEQ's needed to read the file would be greater than one, prior to
attempting a second READSEQ.


Jim

----- Forwarded by James Ronan/IIG/Prudential on 06/22/2005 09:53 AM -----
 

              James Ronan

              Systems                                     To:

              Phone Number: 732-946-5744
u2-users@listserver.u2ug.org                    
              Fax Number: 732-946-5444                    cc:

                                                          Subject:   Field
Count from a Seq File           
              Tuesday June 21, 2005 03:37 PM

 

 





I hope someone can show me an easy way to get the number of lines from a
sequential file - without looping through the file.

I am running UV 10.x on a AIX box.

I open the file using an OPENSEQ command and I am looping through the
record using a READSEQ  command.

Either immediately after the OPENSEQ or after the first READSEQ, I would
like to know if there is more then 1 line in the file.

I know that prior to doing the OPENSEQ, I could open the file, read the
record and then DCOUNT(RECORD,@FM) to get the number of fields, close the
file and then do a sequential open and read.  I am hoping that there is a
system variable or something that I can use after the OPENSEQ.  Looping
through the record is not a viable option.

Thanks

Jim
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

**********************************************************************
This email and any attachments are confidential. They may contain legally 
privileged information or copyright material. You should not read, copy, use or 
disclose them without authorisation. If you are not an intended recipient, 
please contact us at once by return email and then delete the original message 
and all copies. We do not accept liability in connection with computer virus, 
data corruption, delay, interruption, unauthorised access or unauthorised 
amendment.
**********************************************************************
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to