Posted: Wed Feb 21, 2007 5:17 am Post subject: Using restart
Hello Gurus
I need to restart the count whenever there is a change in 2 different non-consecutive columns like in example below.
How do I handle this? Because if I give restart on more than one feild it fails with error. I have seen the synatx of restart is limited to =(p,m) and also(%nn). Can you help me out on this.
Quote:
SORT FROM(IN) TO(T1) USING(CTL1)
SELECT FROM(T1) TO(OUT) ON(1,1,CH) ON(324,2,CH) LAST
Gurus,
I have resolved the problem by re-arranging my sort filelds consecutively and then using a restart on this.
Please let me know if there is a easier solution
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Feb 21, 2007 9:08 am Post subject:
naveen_summary,
You cannot use RESTART parm on non-consecutive fields. You can use the INREC statement to put the 2 fields together and generate the seqnum on OUTREC. If your intention is to get the last record then a simple select option will do it. You can have multiple ON parms on the SELECT statement.
Code:
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,1,CH) ON(324,2,CH) LAST
/*
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum