Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us