|
It looks like you need to put 1's and 0's in the null map. Here's a description: http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AT702/7.8?SHELF=&DT=19990322162443&CASE= It's V4R5, but the manuals for the higher releases are *#@!% PDF's :-( --Dave On Monday 12 January 2004 06:06, Jevgeni Astanovski wrote: > Yes. The first level problem is solved. > > But still I have a feeling, that something is wrong here. > Spent a whole day in attempts to write a program, that adds records from > one null-capable file to another (also null-capable) file. Both files have > identical structure of 3 fields: > field1 alphanumeric, no nulls allowed; > field2 alphanumeric, null capable; > field3 packed decimal. > Program works so: > reads each record from first file, looks if record with identical fields 1 > and 2 exists in second. If not - adds; > If yes - updates the value of field 3 in second file. > > It should be absolutely trivial! > Cannot make it running... > I tried simply to add a record to a null-capable file. As soon, as I open > it with nullcap=y, inserts fail. Eve if inserted record contain no NULL > fields. If I remove nullcap=y from open, everything works... > > Ay advise will appreciated - may be there is some manual, that describes > these pecularities? > > Regards, > Jevgeni > > > -----Original Message----- > > From: Elvis Budimlic [mailto:ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx] > > Sent: 18. detsember 2003. A. 0:40 > > To: 'C programming iSeries / AS400' > > Subject: RE: [C400-L] Reading file with NULL fields > > > > > > Jevgeni, > > > > You need "rr nullcap=Y" when you open the file so you can > > handle the null > > capable fields. > > If that doesn't suffice you may want to learn more about file > > handle's null > > input map (fp->in_null_map). > > > > Elvis > > > > -----Original Message----- > > From: c400-l-bounces@xxxxxxxxxxxx > > [mailto:c400-l-bounces@xxxxxxxxxxxx] On > > Behalf Of Jevgeni Astanovski > > Sent: Wednesday, December 17, 2003 4:13 PM > > To: C programming iSeries / AS400 > > Subject: [C400-L] Reading file with NULL fields > > > > There should be some trick about reading files with > > NULL-capable fields! > > But I deal with it for the first time.... > > > > Have a file Y6CPF: > > > > A R Y6CPFR > > A CPNC 6A TEXT('Account number') > > A DLP 3A TEXT('Deal type') ALWNULL > > > > Try to read it : > > > > fp = _Ropen("*LIBL/Y6CPF", "rr") ; > > > > fb = _Rreadf(fp, &Collateral, sizeof(y6cpf), __NO_LOCK) ; > > while (fb->num_bytes == sizeof(y6cpf)) > > { > > ... > > fb = _Rreadn(fp, &Collateral, sizeof(y6cpf), __NO_LOCK) ; > > } > > > > Nothing strange, I always do it like this. > > Program gets out of the loop on first record, having field DLP=NULL. > > Shit! And my goal was to find just these records... > > What's wrong? It SHOULD be as simple as usual! > > Any help will be really appreciated. > > > > Jevgeni Astanovski.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.