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
 
JCL sort related

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

New User


Joined: 19 Nov 2015
Posts: 12
Location: INDIA

PostPosted: Sun Dec 20, 2015 1:04 pm    Post subject: JCL sort related
Reply with quote

Hi,

I have the input data as below. How can i get max of timestamp in the output file as below.

I need to compare with the first 7 fields from the row (2345^34).

Input:
2345^34 520 DFAKAJDEIH 2013-02-01
2345^34 520 DFAKAJDHSA 2013-02-04
2345^35 520 DFAKAJDHSA 2013-02-05
2345^36 520 DFAKAJDHSA 2013-02-06

Output
2345^34 520 DFAKAJDHSA 2013-02-04
2345^35 520 DFAKAJDHSA 2013-02-05
2345^36 520 DFAKAJDHSA 2013-02-06
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Dec 20, 2015 4:36 pm    Post subject: Reply to: JCL sort related
Reply with quote

It's not really clear what you want, but I think OUTFIL reporting features will do what you want. REMOVECC, NODETAIL with SECTIONS (specifying the key) and MAX for your date-field.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1848
Location: UK

PostPosted: Sun Dec 20, 2015 4:45 pm    Post subject:
Reply with quote

Moved to correct part of form.

If you wanted a sort solution why didn't you post there in the first place?
Back to top
View user's profile Send private message
Mani453

New User


Joined: 19 Nov 2015
Posts: 12
Location: INDIA

PostPosted: Sun Dec 20, 2015 7:57 pm    Post subject: Reply to: JCL sort related
Reply with quote

Hi

Please observe my below input points and output needed

1. In my input first 7 characters are same in two rows but the time stamp is different.

2. Remaining two rows(i.e, 3&4) are different.

My requirement : I need a sort card for this scenario

1. If we observe the output, only three rows fetched because in the first 7 characters in (1&2) rows are same. It fetched based on the latest timestamp.

If my ques is not clear pls let me know.
Back to top
View user's profile Send private message
Mani453

New User


Joined: 19 Nov 2015
Posts: 12
Location: INDIA

PostPosted: Sun Dec 20, 2015 8:02 pm    Post subject: Reply to: JCL sort related
Reply with quote

JCL sort card I need to use

If the first 7 characters are equal then it should be pic the latest timestamp row for the output.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1032
Location: Oostende, Belgium

PostPosted: Sun Dec 20, 2015 8:37 pm    Post subject:
Reply with quote

And what have you tried yourself?
Back to top
View user's profile Send private message
Mani453

New User


Joined: 19 Nov 2015
Posts: 12
Location: INDIA

PostPosted: Sun Dec 20, 2015 9:03 pm    Post subject: Reply to: JCL sort related
Reply with quote

Actually I have 6more requirements.. I have tried althose and got the result using JCL. For this scenario I m not getting thought.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1032
Location: Oostende, Belgium

PostPosted: Sun Dec 20, 2015 9:32 pm    Post subject: Re: Reply to: JCL sort related
Reply with quote

Mani453 wrote:
I have tried althose and got the result using JCL.

That is a blatant lie!

JCL tells z/OS what programs to execute and the datasets and what other resources are required by those programs.

There isn't a flucking JCL statement in existence that can do what you want!
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 546
Location: The Universe

PostPosted: Sun Dec 20, 2015 10:59 pm    Post subject:
Reply with quote

Mani453 - Prino is telling you that there is no such thing as a "JCL sort." JCL is just the control statements that direct the system to run a program, like the sort program, and specify the data sets the program is to use.

There are two common sort programs that are usually run by JCL: the DFSORT program from IBM, and Syncsort from another company. The two programs are similar, though by no means identical. Both programs are superb.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 386
Location: USA

PostPosted: Sun Dec 20, 2015 11:27 pm    Post subject: Reply to: JCL sort related
Reply with quote

Look at this: http://ibmmainframes.com/viewtopic.php?t=64604

.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1747
Location: NY,USA

PostPosted: Mon Dec 21, 2015 11:33 pm    Post subject:
Reply with quote

Where is timestamp though? icon_rolleyes.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1848
Location: UK

PostPosted: Tue Dec 22, 2015 3:34 am    Post subject:
Reply with quote

It is not a timestamp - it is a date. A timestamp includes date AND time.
Back to top
View user's profile Send private message
wiprov

New User


Joined: 13 Feb 2008
Posts: 15
Location: Chennai

PostPosted: Tue Dec 22, 2015 5:42 pm    Post subject:
Reply with quote

Mani,
Can you try this?

Code:

//STEP01   EXEC PGM=ICETOOL                                     
//TOOLMSG   DD  SYSOUT=*                                       
//DFSMSG    DD  SYSOUT=*                                       
//IN DD *                                                       
2345^34 520 DFAKAJDEIH 2013-02-01                               
2345^34 520 DFAKAJDHSA 2013-02-04                               
2345^35 520 DFAKAJDHSA 2013-02-05                               
2345^36 520 DFAKAJDHSA 2013-02-06                               
//T1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT DD SYSOUT=*                                               
//TOOLIN DD *                                                   
SORT FROM(IN) TO(T1) USING(CTL1)                               
SELECT FROM(T1) TO(OUT) ON(1,7,CH) FIRST                       
//CTL1CNTL DD *                                                 
  SORT FIELDS=(1,7,CH,A,24,10,CH,D)                             
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1747
Location: NY,USA

PostPosted: Tue Dec 22, 2015 9:31 pm    Post subject:
Reply with quote

wiprov, You have overlooked the link given by RahulG31. btw that should work.
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 Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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