IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Icetool Select / Splice with sort fields


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mgl

New User


Joined: 12 Dec 2005
Posts: 29
Location: Belgium

PostPosted: Tue Jan 23, 2007 8:10 pm
Reply with quote

Hi,

In manual, it's said that 'USING' parameter of 'SPLICE' or 'SELECT' is for a DDname pointing to Dfsort statement, basically INREC, INCLUDE or OUTFIL statements. But it is not explained the result of using SORT or SUM statement.
I did some test and was really happy to saw that using a SORT FIELDS statement in my ddcntl with a SPLICE, the generated (by splice) SORT FIELDS command is ignored and i splice my dataset with regards to input generated. It allows doing a 'splice by group'.
It is not the same with select, using a sort statement with select, my sort statement is ignored and i have a sort generated by select.

Checking in my sysout i don't see any difference in the information given. In both case, I receive the syntax of my ddcntl followed by the sort fields generated, followed by call to E35 exit.

With the last ptf we loose one opportunities to modify our input before SPLICE or SELECT with outrec not more allowed. I had to modify some job, and often had to add a step or a copy command in my icetool. I hope here to keep 'splice by group' opportunity (and why not 'select by group' if possible).

Therefore i would be happy if anybody can let me know where to have a good description of the use of select and splice, or if not, ask Frank if it is possible for him to ask IBM to evaluate the work requested to avoid the generation of a sort statement in case of one coded in the dd pointed by the 'using' parm.

I join here a doc file of a job using the 'splice by group'

Many thanks in advance,
Michel.
Back to top
View user's profile Send private message
mgl

New User


Joined: 12 Dec 2005
Posts: 29
Location: Belgium

PostPosted: Tue Jan 23, 2007 8:42 pm
Reply with quote

Sorry, it seems that i did a mistake, SELECT take also in account the SORT FIELDS statement.

Regards,
Michel.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jan 23, 2007 10:17 pm
Reply with quote

You can use a SORT statement with both SELECT and SPLICE. An OUTREC statement was never allowed with SELECT or SPLICE, but OUTFIL statement(s) were always allowed. With the April, 2006 DFSORT PTF, we now issue a message to prevent the use of an OUTREC statement whereas before it would usually result in a S0C4 abend. Also with the April, 2006 DFSORT PTF, we now allow INREC with SELECT and SPLICE which wasn't allowed before.

The DFSORT statements that are allowed and not allowed with SELECT are discussed here:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.11?DT=20060615185603

The DFSORT statements that are allowed and not allowed with SPLICE are discussed here:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.13?DT=20060615185603
Back to top
View user's profile Send private message
mgl

New User


Joined: 12 Dec 2005
Posts: 29
Location: Belgium

PostPosted: Tue Jan 23, 2007 10:59 pm
Reply with quote

Hi,
Many thanks for the answer, but the extract of the book you mentioned don't speak about SUM (Allowed or not ?) and don't allow SORT for the SPLICE.
But up to now i didn't encounter any problem with sort statement in a splice, and as you can see in the sample i joined, it can be really useful.

Best regards,
Michel.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Jan 24, 2007 12:28 am
Reply with quote

Oops. You're right. I forgot what I wrote. icon_redface.gif A SORT statement can be used "officially" with SELECT as discussed. A SORT statement cannot be used "officially" with SPLICE, but there are probably cases where it will work ok.

A SUM statement cannot be used "officially" with SELECT or SPLICE, but there are probably cases where it will work ok. I suspect that OUTFIL with SECTIONS, which is supported, can be used to do whatever you'd want to do with SUM.

I took a quick look at your job. You're overriding SPLICE's SORT statement with SORT FIELDS=COPY. That will work as long as your records are already in sorted order by the ON fields.

An OUTREC statement with SPLICE really isn't needed since OUTFIL BUILD, OVERLAY and IFTHEN are available.
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Wed Jan 24, 2007 2:23 pm
Reply with quote

Frank wrote :
Quote:

Oops. You're right. I forgot what I wrote. A SORT statement can be used "officially" with SELECT as discussed. A SORT statement cannot be used "officially" with SPLICE, but there are probably cases where it will work ok.

I hope it will become "official" soon icon_biggrin.gif
Back to top
View user's profile Send private message
mgl

New User


Joined: 12 Dec 2005
Posts: 29
Location: Belgium

PostPosted: Wed Jan 24, 2007 2:27 pm
Reply with quote

Many thanks for the answer Frank,

I understand that if you code yourself the sort statement, you modify the base of the Splice or Select way to work and of course modify the result produced( with possibility of abend0c4 or abend0c1) . I am just afraid that IBM can rewrite the code or avoid the use of this possibility from one day to another. That's allow use of these options only for temporary job's.

By the way, my idea for the sum was to do a Select alldups on(fieldA), with in ddcntl a sort fields (fieldA,fieldB,fieldC) with sum fields(none).
Example, fieldA is dataset name from smf16, fieldb is step name from smf16 and fieldc is job name of smf16. I expect so in one select to receive all the access to a dataset by Dfsort but avoid entries for job rerun.
I will try and .... see but anyway i know that it is not official so ... no support in the future.

Best regards,
Michel.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top