IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Selecting the max value from a file.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 53
Location: pune

PostPosted: Fri Nov 25, 2022 12:43 pm
Reply with quote

i had a file with the below layout

IBMSNAP_INTENTSEQ (BYTE(10))
,IBMSNAP_OPERATION (CHAR(1))
,IBMSNAP_COMMITSEQ (BYTE(10))
,IBMSNAP_LOGMARKER (CHAR(26))

i would load this file onto a table and then use sql to get the
MAX(IBMSNAP_COMMITSEQ||IBMSNAP_INTENTSEQ)
and
MIN(IBMSNAP_COMMITSEQ||IBMSNAP_INTENTSEQ)

i was looking out for a way to do it with sort so i can get the above two values
without having to load the file into a table.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 940
Location: Bamberg, Germany

PostPosted: Fri Nov 25, 2022 1:15 pm
Reply with quote

See DFSORT OUTFIL, using there MAX and MIN parameters.
Back to top
View user's profile Send private message
pema_yozer

New User


Joined: 16 Feb 2009
Posts: 53
Location: pune

PostPosted: Fri Nov 25, 2022 8:04 pm
Reply with quote

thank you let me check that out and try to work it out.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2963
Location: NYC,USA

PostPosted: Sat Nov 26, 2022 3:21 am
Reply with quote

You can Google as well as it was discussed many a times on this forum. Please make a use of code tags.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts File Aid Batch IBM Tools 7
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Extract record using 2 input file int... JCL & VSAM 2
No new posts I want to append a record in an exist... CLIST & REXX 17
Search our Forums:

Back to Top