What language are you using? If it's RPG (either III or IV), try compiling your program with ALWNULL(*YES).
What language are you using? If it's RPG (either III or IV), try compiling your program with ALWNULL(*YES).
I thought this area was only for CL questions, so it is CLP. Thanks Jeff Wilson AMJLR - I.T. jwils207@ford.com
I am getting a data mapping error when I try and do an OPNQRYF over QADBIFLD (the field cross reference file). The command fails for reason 19 - An unexpected null field was found. Since this is a system generated file, I am not sure how this is possible or how to fix it. Can anyone give me a hand? Thanks very much! Jeff Wilson IT Consultant Aston Martin-Jaguar-Landrover
Thanks..but I was wrong. The error was actually in the RPG. I thought that the error was being sent as part of the OPNQRYF, but it was sent right after the call to the RPG. I recompiled the RPG with Allow Null (*USRCTL) and it looks like it is working now. Thanks again...
> I am getting a data mapping error when I try and > do an OPNQRYF over QADBIFLD (the field > cross reference file). The command fails for > reason 19 - An unexpected null field was found. I wouldn't use the QADB* files; rather I'd use SYSCOLUMNS, but that won't help much. That file has null capable fields. I assume you have something like pgm dclf qadbifld opnqryf qadbifld rcvf clof qadbifld endpgm If you are trying to read the file in your CL, you are out of luck. CL does not handle null fields. You need to create a format file which does not include the null capable columns. Either that or use a language that can handle them (like RPG). If you really need to read the file in CL, consider using QMQRY instead of OPNQRYF. You can direct the output to a file and use COALESCE to handle the null columns. There is a FAQ at http://faq.midrange.com which may help you with QMQRY. --buck
JeffWilson wrote: > I thought this area was only for CL questions, so it is CLP. Um, Jeff? Not everyone is as careful to post in the correct forum as you have, so it was entirely appropriate for Ted to clarify your situation. Bill