Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Receiving highest and lowest values from a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
adoerner

New User


Joined: 25 Apr 2007
Posts: 11
Location: Germany

PostPosted: Tue Apr 08, 2008 1:04 pm    Post subject: Receiving highest and lowest values from a dataset
Reply with quote

Input Dataset=
555551
555552
111114
111115
222226
222227
888888
888889
33333A
33333B

I want to receive the Datas with the highest and lowast values in the first 5 bytes:


Output Dataset=
111114
111115
888888
888889

Axel
Back to top
View user's profile Send private message

shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Tue Apr 08, 2008 5:30 pm    Post subject: Reply to: Receiving highest and lowest values from a dataset
Reply with quote

Please tell me whether the output needs to be in below format
Code:
111114
111115
888888
888889


or only the highest and lowest
Code:
111114
888889
Back to top
View user's profile Send private message
adoerner

New User


Joined: 25 Apr 2007
Posts: 11
Location: Germany

PostPosted: Tue Apr 08, 2008 5:38 pm    Post subject:
Reply with quote

This is, what I want:

Code:
111114
111115
888888
888889
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Apr 08, 2008 10:13 pm    Post subject:
Reply with quote

adoerner,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),
    TRAILER1=('TMIN,+',MIN=(1,5,ZD,TO=ZD,LENGTH=5),/,
              'TMAX,+',MAX=(1,5,ZD,TO=ZD,LENGTH=5))
/*
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=...  output file (FB)
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(1,5,ZD,EQ,TMIN,OR,1,5,ZD,EQ,TMAX)
/*


shrivatsa,

Note that the requirement is:

Quote:
I want to receive the Datas with the highest and lowast values in the first 5 bytes


You seem to be misinterpreting that as the first 6 bytes.
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Wed Apr 09, 2008 11:00 am    Post subject: Reply to: Receiving highest and lowest values from a dataset
Reply with quote

Thanks Frank for notifying me this...

I am learning lot from you...

Thanks again....
Back to top
View user's profile Send private message
adoerner

New User


Joined: 25 Apr 2007
Posts: 11
Location: Germany

PostPosted: Wed Apr 09, 2008 6:03 pm    Post subject:
Reply with quote

What a tricky solution !icon_eek.gif

Thank you very much.
Axel
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us