Just a wild guess?
Sort it in reverse and take the first record as oldest date??

Chris Hoelscher
Lead Sys DBA 
IBM Global Technical Services on assignmemt to Humana Inc.
T 502.476.2538  or 502.407.7266


-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Lizette Koehler
Sent: Friday, September 25, 2020 1:16 PM
To: [email protected]
Subject: Re: [IBM-MAIN] DFSort to pull the latest record date

[External Email: Use caution with links and attachments]


Why not load the data into a DB and use SQL or similar language?

If you have SAS - Max Min - functions

If you can load to EXCEL - use its functions

Not all functions on the mainframe can do everything.  You should look at what 
makes sense.  And if the tool you are comfortable in using, does not have the 
function, I would say to find one that does.

Hope that helps

Lizette


-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Ron 
Thomas
Sent: Friday, September 25, 2020 9:55 AM
To: [email protected]
Subject: DFSort to pull the latest record date

Hello

We are using DFSORT utility to extract the latest record for a store/item/po 
and below is the sample file

item_nbr| Store_nbr|Po_nbr|item_date|mode|
000000604|9137|1100276393|2017-12-26|00007|DSD   |
000000604|9137|1100278550|2018-01-09|00006|DSD   |

Here we need to pull the 2'nd record to the Output as this is the latest date .

Could someone please let me know how to achieve the same

Regards
Ron T

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.

Humana Inc. and its subsidiaries comply with applicable Federal civil rights 
laws and
do not discriminate on the basis of race, color, national origin, ancestry, 
age, disability, sex,
marital status, gender, sexual orientation, gender identity, or religion. 
Humana Inc. and its subsidiaries do not
exclude people or treat them differently because of race, color, national 
origin, ancestry, age,
disability, sex, marital status, gender, sexual orientation, gender identity, 
or religion.

English: ATTENTION: If you do not speak English, language assistance services, 
free
of charge, are available to you. Call 1‐877‐320‐1235 (TTY: 711).

Español (Spanish): ATENCIÓN: Si habla español, tiene a su disposición servicios
gratuitos de asistencia lingüística. Llame al 1‐877‐320‐1235 (TTY: 711).

繁體中文(Chinese):注意:如果您使用繁體中文,您可以免費獲得語言援助
服務。請致電 1‐877‐320‐1235 (TTY: 711)。

Kreyòl Ayisyen (Haitian Creole): ATANSION: Si w pale Kreyòl Ayisyen, gen sèvis 
èd
pou lang ki disponib gratis pou ou. Rele 1‐877‐320‐1235 (TTY: 711).

Polski (Polish): UWAGA: Jeżeli mówisz po polsku, możesz skorzystać z bezpłatnej
pomocy językowej. Zadzwoń pod numer 1‐877‐320‐1235 (TTY: 711).

한국어 (Korean): 주의: 한국어를 사용하시는 경우, 언어 지원 서비스를 무료로
이용하실 수 있습니다. 1‐877‐320‐1235 (TTY: 711)번으로 전화해 주십시오.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to