Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageOn 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
Post Follow-up to this messageHi 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
Post Follow-up to this messageChances 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
Post Follow-up to this messagefrank 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"
Post Follow-up to this message"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.
Post Follow-up to this messageHi 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 > >
Post Follow-up to this messageRichard 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.
Post Follow-up to this messageHello, 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)
Post Follow-up to this messageMy 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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.