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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


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