Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Tue Jan 30, 2007 7:33 am Post subject:
possibly, if you elaborate (what do your records look like, how can the group be identified, etc...) you might receive a specific answer.
If this is a "generic" question, the probably, the SPLICE option of INREC or OUTREC (DFSORT- ICETOOL) could be employed _________________ Dick Brenholtz
American living in Varel, Germany
might be what you're looking for. If not, show an example of the records in each input file and the expected output records and give the RECFM and LRECL of the input files. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
i want to combine lets say 2nd (def) and last (jkl) record to produce one record (defjkl). the output file may contain the combined record w/ the original records or only the combined record. any solution close to this will be very much appreciated
Joined: 26 Nov 2002 Posts: 12381 Topics: 75 Location: San Jose
Posted: Wed Jan 31, 2007 8:49 am Post subject:
The following DFSORT/ICETOOL examples shows you how to merge the multiple records into a single record.
Code:
//*********************************************************************
//* THIS SORT STEP WILL COMBINE EVERY 2 RECORDS AS 1 LONG RECORD **
//* THE LRECL WILL BE DOUBLED IF THE ORIGINAL LRECL IS 80 THEN **
//* OUTPUT LRECL IS 160 (EVERY EVEN RECORD PLACED SIDE BY SIDE TO **
//* AN ODD RECORD). **
//*********************************************************************
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
REC01
REC02
REC03
REC04
REC05
REC06
REC07
REC08
REC09
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) WITHEACH -
ON(161,8,CH) -
WITH(081,80) -
KEEPNODUPS USING(CTL1)
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(001:01,80,
081:01,80,
161:SEQNUM,8,ZD,START=2,INCR=1,
169:161,8,ZD,MOD,+2,TO=ZD,LENGTH=1),HIT=NEXT),
Joined: 26 Nov 2002 Posts: 12381 Topics: 75 Location: San Jose
Posted: Fri Mar 21, 2008 10:15 am Post subject:
dragone_007,
You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE. Show us the TOOLMSG and DFSMSG messages and I can tell if you have PTF installed or not.
********************************* TOP OF DATA **********************
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED
ICE650I 0 VISIT http://www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES A
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS: TOOLIN
ICE630I 0 MODE IN EFFECT: STOP
SPLICE FROM(IN) TO(OUT) WITHEACH ON(161,8,CH) -
WITH(081,80) KEEPNODUPS USING(CTL1)
ICE606I 0 DFSORT CALL 0001 FOR SORT FROM IN TO OUT USING CTL1CNTL COM
ICE628I 0 RECORD COUNT: 000000000000009
ICE638I 0 NUMBER OF RECORDS RESULTING FROM CRITERIA: 000000000000009
ICE602I 0 OPERATION RETURN CODE: 00
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE: 00
******************************** BOTTOM OF DATA ********************
DFSMSG :
*********************************
ICE200I 0 IDENTIFIER FROM CALLING PROGRAM IS 0001
ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 15:20 ON FRI
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(001:01,80,
081:01,80,
161:SEQNUM,8,ZD,START=2,INCR=1,
169:161,8,ZD,MOD,+2,TO=ZD,LENGTH=1),HIT=NEXT),
Joined: 26 Nov 2002 Posts: 12381 Topics: 75 Location: San Jose
Posted: Fri Mar 21, 2008 10:46 am Post subject:
dragone_007,
You have shown only partial messages. The one I am interested is ICE201I message
If you have the latest PTF you will find an E after the ICE201I message
Quote:
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
if you see a message like this , then you don't have the latest PTF
Code:
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1
If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:
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