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: 54
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

Senior Member


Joined: 15 Aug 2015
Posts: 1249
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: 54
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: 3051
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top