Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

reading a csv file generated with access
Hi there,
I am trying to read a file generated with access (comma delimited), but when
opening it gives a 48 status.
It is described as sequential.


--
Regards,

francisco zelaya



Report this thread to moderator Post Follow-up to this message
Old Post
frank
03-27-04 03:59 AM


Re: reading a csv file generated with access
On Thu, 4 Mar 2004 12:26:02 -0800, "frank" <applied_software@msn.com>
wrote:

>Hi there,
>I am trying to read a file generated with access (comma delimited), but whe
n
>opening it gives a 48 status.
>It is described as sequential.
Please post the following.

1- Compiler used (vendor and version)
2- Full source code used to describe the file, open and read it.




Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com

Report this thread to moderator Post Follow-up to this message
Old Post
Frederico Fonseca
03-27-04 03:59 AM


Re: reading a csv file generated with access
Hi Frederico,

The compiler is fujitsu v3.
and the way is presented below is sending a 39 status at opening, it does
not pass through it so i am sending the open code only.

SELECT MICLIENT
ASSIGN TO "H:\ACCOUNTS.CSV"
ORGANIZATION IS SEQUENTIAL
*              PADDING CHARACTER IS ","
*              RECORD DELIMITER STANDARD-1
FILE STATUS IS CU-STAT.

FD  MICLIENT
*      BLOCK CONTAINS 2 RECORDS
RECORD CONTAINS 10 TO 109 CHARACTERS
LABEL RECORD IS STANDARD.
*
01  SHORT-REC PIC X(10).
01  LONG-REC PIC X(109).
01  CMX-RECORD.
02 CMX-CODS.
04 CMX-COD     PIC 9(4).
02 CMX-REFR.
04 CMX-COMPANY    PIC X(30).
02 CMX-SUITE.
04 CMX-SUITE1    PIC X(8).
02 CMX-REFA.
04 CMX-ADDRESS  PIC X(20).
04 CMX-ADDRESS1 PIC X(20).
04 CMX-ATTN     PIC X(20).
04 CMX-TAX      PIC 9(5)V99.

OPEN INPUT MICLIENT.

Your help is appreciated,


"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
 news:h36f40lsrjul7c60pljf13so50g9j9pkp8@
4ax.com...
> On Thu, 4 Mar 2004 12:26:02 -0800, "frank" <applied_software@msn.com>
> wrote:
> 
when 
> Please post the following.
>
> 1- Compiler used (vendor and version)
> 2- Full source code used to describe the file, open and read it.
>
>
>
>
> Frederico Fonseca
> ema il: frederico_fonseca at syssoft-int.com



Report this thread to moderator Post Follow-up to this message
Old Post
frank
03-27-04 03:59 AM


Re: reading a csv file generated with access
Chances are that your file is a LINE SEQUENTIAL not (default - ANSI conformi
ng)
RECORD Sequential.  Make the following changes and see how it goes:

SELECT MICLIENT
ASSIGN TO "H:\ACCOUNTS.CSV"
ORGANIZATION IS  line SEQUENTIAL
*              PADDING CHARACTER IS ","
*              RECORD DELIMITER STANDARD-1
FILE STATUS IS CU-STAT.
..

FD  MICLIENT
*      BLOCK CONTAINS 2 RECORDS
*      RECORD CONTAINS 10 TO 109 CHARACTERS
*     LABEL RECORD IS STANDARD

Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
03-27-04 03:59 AM


Re: reading a csv file generated with access
frank wrote:
> Hi there,
> I am trying to read a file generated with access (comma delimited),
> but when opening it gives a 48 status.
> It is described as sequential.

Huh?

"48" is "Write on file not opened in appropriate mode"



Report this thread to moderator Post Follow-up to this message
Old Post
JerryMouse
03-27-04 03:59 AM


Re: reading a csv file generated with access
"frank" <applied_software@msn.com> wrote

> The compiler is fujitsu v3.
> and the way is presented below is sending a 39 status at opening, it does
> not pass through it so i am sending the open code only.
>
>   SELECT MICLIENT
>                ASSIGN TO "H:\ACCOUNTS.CSV"

File staus '39' is file not found.  There is no file called
'H:\ACCOUNTS.CSV' so the OPEN INPUT failed.

If you had ignored this and gone on to do something else with the file
then you would get strange file status codes because the file is not
open.

The implication of the '.CSV' on the file name is that it is a Comma
Separated Value file.  This cannot be read into a record area directly
as the fields are not in fixed positions.  If it is a CSV then you
will need to declare it LINE SEQUENTIAL and separate the fields
yourself.

Report this thread to moderator Post Follow-up to this message
Old Post
Richard
03-27-04 03:59 AM


Re: reading a csv file generated with access
Hi there,
If I change to line sequential, it togles the file status to 48 from 39; and
doesn't pass over the open statement. I know 48 shouldn't be there because
is not doing any i-o operation.
"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:RkN1c.19225$yZ1.18131@newsread2.news.pas.earthlink.net...
> Chances are that your file is a LINE SEQUENTIAL not (default - ANSI
conforming)
> RECORD Sequential.  Make the following changes and see how it goes:
>
>    SELECT MICLIENT
>                 ASSIGN TO "H:\ACCOUNTS.CSV"
>                      ORGANIZATION IS  line SEQUENTIAL
>        *              PADDING CHARACTER IS ","
>        *              RECORD DELIMITER STANDARD-1
>                      FILE STATUS IS CU-STAT.
>     ...
>
>        FD  MICLIENT
>        *      BLOCK CONTAINS 2 RECORDS
>        *      RECORD CONTAINS 10 TO 109 CHARACTERS
>        *     LABEL RECORD IS STANDARD
>                             .
>
>
> --
> Bill Klein
>  wmklein <at> ix.netcom.com
> "frank" <applied_software@msn.com> wrote in message
> news:c286co$bkv$1@zook.lafn.org... 
does 
but 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
frank
03-27-04 03:59 AM


Re: reading a csv file generated with access
Richard wrote:
> "frank" <applied_software@msn.com> wrote
> 
>
> File staus '39' is file not found.  There is no file called
> 'H:\ACCOUNTS.CSV' so the OPEN INPUT failed.

No, "39" is "Conflict between fixed and defined file attributes."

This means that the actual file on the disk does not conform to the
program's file definition.

"35" is file not found.




Report this thread to moderator Post Follow-up to this message
Old Post
JerryMouse
03-27-04 03:59 AM


Re: reading a csv file generated with access
Hello,

You will have to give us much more code, for us to be able to help.

One possibility is that you use the same file-status data-item for
more than one file and are seeing the result of another i/o operation.

Do you always test the file-status after every i/o operation on all
files and fully account for all exceptional cases?

Regards,  Robert

"frank" <applied_software@msn.com> wrote in message news:<c292p5$lak$1@zook.lafn.org>...[co
lor=darkred]
> Hi there,
> If I change to line sequential, it togles the file status to 48 from 39; a
nd
> doesn't pass over the open statement. I know 48 shouldn't be there because
> is not doing any i-o operation.
> "William M. Klein" <wmklein@nospam.netcom.com> wrote in message
> news:RkN1c.19225$yZ1.18131@newsread2.news.pas.earthlink.net... 
>  conforming) 

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Jones
03-27-04 03:59 AM


Re: reading a csv file generated with access
My guess is that you didn't catch all of Bill's changes.  In addition
to changing to line sequential, the variable length record
specification was removed form the FD.

Contrary to other messages "39" is not a file not found, that would
have given you a "35".  "39" is a fixed file attribute problem - which
I expect to see if you use Line Sequential WITH the variable length
record specification.

"frank" <applied_software@msn.com> wrote in message news:<c292p5$lak$1@zook.lafn.org>...[co
lor=darkred]
> Hi there,
> If I change to line sequential, it togles the file status to 48 from 39; a
nd
> doesn't pass over the open statement. I know 48 shouldn't be there because
> is not doing any i-o operation.
> "William M. Klein" <wmklein@nospam.netcom.com> wrote in message
> news:RkN1c.19225$yZ1.18131@newsread2.news.pas.earthlink.net... 
>  conforming) 
>  does 
>  but
>  when 

Report this thread to moderator Post Follow-up to this message
Old Post
Thane Hubbell
03-27-04 03:59 AM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:37 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.