I'm trying to do the following in SORT/ICETOOL with SPLICE but I'm not sure if its possible:
Input File:
AAAAAAAA111
AAAAAAAA222
BBBBBBBB111
BBBBBBBB222
BBBBBBBB333
Desired Output File:
AAAAAAAA111222
BBBBBBBB111222333
Would be grateful for any help.
SPLICE
-
- Posts: 2
- Joined: Tue Feb 03, 2009 3:05 am
- Skillset: PL1 JCL etc
- Referer: Found on google
- Frank Yaeger
- Global moderator
- Posts: 1079
- Joined: Sat Jun 09, 2007 8:44 pm
- Skillset: DFSORT, ICETOOL, ICEGENER
- Referer: Search
- Contact:
Re: SPLICE
For each "key" in positions 1-8, you want to build one record with positions 9-11 from each record with that key? Is that correct?
What is the maximum number of records for a key?
What is the RECFM and LRECL of the input file and output file?
What is the maximum number of records for a key?
What is the RECFM and LRECL of the input file and output file?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
-
- Posts: 2
- Joined: Tue Feb 03, 2009 3:05 am
- Skillset: PL1 JCL etc
- Referer: Found on google
Re: SPLICE
Yes, thats correct. For each key(position 1 to 8) I want to build one record with positions 9 to 11 from each record with that key.
The maximum number of records for a key is ten.
The RECFM of the input and output file is VB and the LRECL is 100. However I can change both these parameters easily if need be.
The maximum number of records for a key is ten.
The RECFM of the input and output file is VB and the LRECL is 100. However I can change both these parameters easily if need be.
- Frank Yaeger
- Global moderator
- Posts: 1079
- Joined: Sat Jun 09, 2007 8:44 pm
- Skillset: DFSORT, ICETOOL, ICEGENER
- Referer: Search
- Contact:
Re: SPLICE
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: Select all
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (VB/100)
//OUT DD DSN=... output file (VB/100)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(7,8,CH) WITHEACH VLENMAX USING(CTL1) -
WITH(18,3) WITH(21,3) WITH(24,3) WITH(27,3) WITH(30,3) -
WITH(33,3) WITH(36,3) WITH(39,3) WITH(42,3)
/*
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,
BUILD=(1,4,5:SEQNUM,2,ZD,RESTART=(5,8),7:5)),
IFTHEN=(WHEN=(5,2,ZD,EQ,2),OVERLAY=(18:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,3),OVERLAY=(21:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,4),OVERLAY=(24:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,5),OVERLAY=(27:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,6),OVERLAY=(30:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,7),OVERLAY=(33:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,8),OVERLAY=(36:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,9),OVERLAY=(39:15,3)),
IFTHEN=(WHEN=(5,2,ZD,EQ,10),OVERLAY=(42:15,3))
OUTFIL FNAMES=OUT,BUILD=(1,4,5:7)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Splice JCL into one record for DD statement parms
by phcribb » Thu Nov 05, 2020 9:31 pm » in CLIST & REXX - 3
- 1960
-
by phcribb
View the latest post
Fri Nov 06, 2020 8:06 pm
-