|
I am not real sure what your files are set up like, but if you want to print some text when one of the files does not have a matched record in the other file, you could use a left outer join and the coalesce() function. select a.item coalesce(b.recieve_info,'***part not received***') from a left outer join b -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of as400tech@xxxxxxxxxxx Sent: Tuesday, September 13, 2005 2:42 PM To: midrange-l@xxxxxxxxxxxx Subject: Re: CALLPRC & CRTBNDCL O.K., I admit that I am not the sharpest tool in the shed when it comes to SQL so here is what I am trying to do. I have a history file that I need to read for a certain time period to see if certain parts have been received during that time period. Ordinarily I would use embedded sql to join the two files together and print out which parts from the exception file were found in the history file. However, the requirements of this project are to print a "part not received" line if the part in the exception file was not received during the time period selected. The only way I know to do this would be to either: A.) create an OPNQRYF over the history file in a CL and chain to it or B.) use embedded sql to pull the information out of the history file and use that to chain to the exception file. I don't particularly like (B) in this instance because it seems like an awful lot of I/O for the 4 or 5 parts in the exception file. I was going to use (A) and that is where I ran into problems with the CALLPRC command not knowing where the procedure was no matter how the cl was compiled. If any one has other ideas, I am all ears. Thanks, Terry > ------------------------------ > > message: 4 > date: Tue, 13 Sep 2005 11:24:37 -0500 (CDT) > from: Scott Klement <midrange-l@xxxxxxxxxxxxxxxx> > subject: Re: CALLPRC & CRTBNDCL > > > Thanks to all who replied. It looks like I will only be able to use > > CALLPRC with the CRTCLMOD or CRTPGM commands. Of course if I knew an SQL > > alternative to the OPNQRYF command, I wouldn't need the CLLE in the > > first place. ;-) > > Huh? > > a) You don't need CL to use OPNQRYF. > > b) SQL _is_ an alternative to OPNQRYF. > > c) You can also use CALLPRC with CRTBNDCL, you just have to call a a > procedure that the program already knows about, for example, MI builtins, > the CEExxxx APIs, etc. > > > > > ------------------------------ > > message: 5 > date: Tue, 13 Sep 2005 11:29:29 -0500 > from: rob@xxxxxxxxx > subject: Re: CALLPRC & CRTBNDCL > > 1 - Did you try CRTBNDCL ... DFTACTGRP(*NO) ACTGRP(*CALLER) > > 2 - Are you adverse to imbedded sql in your HLL instead? > > Rob Berendt > -- > Group Dekko Services, LLC > Dept 01.073 > PO Box 2000 > Dock 108 > 6928N 400E > Kendallville, IN 46755 > http://www.dekko.com > > > > >
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.