On Thu, Aug 1, 2019 at 11:20 AM retired mainframer <retired-mainfra...@q.com>
wrote:

> Why are two records desired for 96.12 but only one for 95.12?
>

Because there are two different "keys" for the 95.12 There is

500000338     789997580026.00 36052910        DF

and

500000318     789997580026.00 36052910        DF

In the second "key", the price in all three records is the same: 95.12. So
there is no variance in the price. There are just duplicate records.



>
> > -----Original Message-----
> > From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On
> > Behalf Of Ron Thomas
> > Sent: Thursday, August 01, 2019 8:03 AM
> > To: IBM-MAIN@LISTSERV.UA.EDU
> > Subject: Re: dfsort: Sort job to get price variance records
> >
> > Ok Elardus.
> >
> > I will paste the requirement and output files  generated again
> >
> > We have a FB File LRECL = 80 bytes and here below is the layout.
> Buy_price is at
> > position 65 of length 10 bytes . We need to pull those item nbrs
> > which has same UPC,Vendor nbr ,State Code but there is price difference.
> Could
> > anyone let me know how this to be done using dfsort.
> >
> > Input file :-
> >
> > ITEM NUMBER   UPC_NBR           VendorNbr     STATE_CODE
> >       BUY_PRICE
> > 500000338     789997580026.00 36052910        DF              96.12
> > 500000338     789997580026.00 36052910        DF              96.12
> > 500000338     789997580026.00 36052910        DF              95.12
> > 500000318     789997580026.00 36052910        DF              95.12
> > 500000318     789997580026.00 36052911        DF              95.12
> > 500000318     789997580026.00 36052911        DF              95.12
> >
> > Desired o/p
> >
> > 500000338     789997580026.00 36052910        DF              96.12
> > 500000338     789997580026.00 36052910        DF              96.12
> > 500000338     789997580026.00 36052910        DF              95.12
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>


-- 
A sine curve goes off to infinity, or at least the end of the blackboard.
-- Prof. Steiner

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to