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: 1348
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: 3077
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 3 File Match Method - Useful across a... COBOL Programming 2
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top