From: taoxianfeng on 24 Jul 2008 05:40 Hi all I'm writing a batch source to match 2 input files which is exported from AIX DB2 giving the matched records. All other characters are going well except X'0D':all of them get lost when reading the input files into the program. I tried many file handler options and runtime switches but no one worked. Any advice is appreaciated. Thanks in advance! Line sequential file, variable-length record. This is the file handler I'm using now: [XFH-DEFAULT] STRIPSPACE=OFF INSERTNULL=OFF EXPANDTAB=OFF AIX 5.3, Microfocus Server Express 5.0
From: Richard on 24 Jul 2008 15:30 On Jul 24, 9:40 pm, taoxianf...(a)gmail.com wrote: > Hi all > > I'm writing a batch source to match 2 input files which is exported > from AIX DB2 giving the matched records. > > All other characters are going well except X'0D':all of them get lost > when reading the input files into the program. I tried many file > handler options and runtime switches but no one worked. Any advice is > appreaciated. Thanks in advance! > > Line sequential file, variable-length record. LINE SEQUENTIAL is defined as being variable records where the end of each record is indicated (on AIX) by a x'0D' character. These are added automatically when writing and stripped off when reading. You have specified that the file is 'line sequential' and then complain when you get the designated behavior. Specify the file like this: SELECT TextFile ASSIGN whatever ORGANIZATION LINE SEQUENTIAL FILE STATUS .. . DATA DIVISION. FILE SECTION. FD TextFile RECORD VARYING FROM 0 TO 256 DEPENDING ON TSize. 01 TextLine. 03 TLc PIC X(256). TSize will contain the record length. You can insert a x"0D" after that or use reference modification on the compares, or just compare lengths.
From: taoxianfeng on 24 Jul 2008 20:51 On Jul 25, 2:28 am, Robert <n...(a)e.mail> wrote: > On Thu, 24 Jul 2008 02:40:37 -0700 (PDT), taoxianf...(a)gmail.com wrote: > >Hi all > > >I'm writing a batch source to match 2 input files which is exported > >from AIX DB2 giving the matched records. > > >All other characters are going well except X'0D':all of them get lost > >when reading the input files into the program. I tried many file > >handler options and runtime switches but no one worked. Any advice is > >appreaciated. Thanks in advance! > > >Line sequential file, variable-length record. > > >This is the file handler I'm using now: > >[XFH-DEFAULT] > >STRIPSPACE=OFF > >INSERTNULL=OFF > >EXPANDTAB=OFF > > >AIX 5.3, Microfocus Server Express 5.0 > > Define the file as record sequential, record length 512, and parse the lines yourself. The > last short block is a little tricky.- Hide quoted text - > > - Show quoted text - Do you mean fixed-length record sequential? The record exported from AIX DB2 is variable-length so I think it will be even worse.
From: taoxianfeng on 24 Jul 2008 21:16 On Jul 25, 2:47 am, Howard Brazee <how...(a)brazee.net> wrote: > I noticed that a free editor for the Mac (Textwrangler) gives people > the option of saving a text file about a dozen different ways. (Mac, > Unix, various Unicode, Windows, line-feed, form-feed). > > I'm wondering if there are similar free or cheap utilities that can do > this kind of conversion on your platform. We are restricted to solving the problem within the cobol program, not to mention the Mac editor... Thanks anyway
From: taoxianfeng on 24 Jul 2008 21:34
On Jul 25, 4:30 am, Richard <rip...(a)azonic.co.nz> wrote: > On Jul 24, 9:40 pm, taoxianf...(a)gmail.com wrote: > > > Hi all > > > I'm writing a batch source to match 2 input files which is exported > > from AIX DB2 giving the matched records. > > > All other characters are going well except X'0D':all of them get lost > > when reading the input files into the program. I tried many file > > handler options and runtime switches but no one worked. Any advice is > > appreaciated. Thanks in advance! > > > Line sequential file, variable-length record. > > LINE SEQUENTIAL is defined as being variable records where the end of > each record is indicated (on AIX) by a x'0D' character. These are > added automatically when writing and stripped off when reading. > > You have specified that the file is 'line sequential' and then > complain when you get the designated behavior. > > Specify the file like this: > > SELECT TextFile > ASSIGN whatever > ORGANIZATION LINE SEQUENTIAL > FILE STATUS .. > . > > DATA DIVISION. > FILE SECTION. > FD TextFile > RECORD VARYING FROM 0 TO 256 DEPENDING ON TSize. > 01 TextLine. > 03 TLc PIC X(256). > > TSize will contain the record length. You can insert a x"0D" after > that or use reference modification on the compares, or just compare > lengths. I don't agree.Isn't line sequential file delimited by X'0A'? Sorry I didn't find English page. $B9T=g%U%!%$%k$G$O!"%U%!%$%k$N3F%l%3!<%I$N4V$O!"%l%3!<%I6h@Z$jJ8;z$G6h@Z$i$l$^$9!#%l%3!<%I6h@Z$jJ8;z$O!"%i%$%s%U%#!<%IJ8;z(B (x"0A") $B$G9=(B $B@.$5$l!"3F%l%3!<%I$N:G8e$K$"$k6uGrJ8;z0J30$NJ8;z$N8e$KA^F~$5$l$^$9(Bhttp://www.microfocus.co.jp/manuals/ SE40/fhorgs.htm Or could you give me the documentation link saying that line sequential file is delimited by X'0D'? Thank you very much |