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

Can I do this with ICETOOL?


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

New User


Joined: 29 Mar 2007
Posts: 7
Location: Mexico

PostPosted: Thu Apr 12, 2007 11:49 pm
Reply with quote

Can I do this with ICETOOL?

INPUT DATA SET
11B0005
12A0045
12B0055
12C0078

OUTPUT DATA SET
11A0003B0005
12A0045B0055C0078
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Apr 12, 2007 11:54 pm
Reply with quote

Where did the "A0003" in "11A0003B0005" come from?
How many of the same "keys" with different data can there be?
Back to top
View user's profile Send private message
dimebag

New User


Joined: 29 Mar 2007
Posts: 7
Location: Mexico

PostPosted: Fri Apr 13, 2007 1:53 am
Reply with quote

Sorry, it should be:

INPUT DATA SET
11A0003
11B0005
12A0045
12B0055
12C0078

OUTPUT DATA SET
11A0003B0005
12A0045B0055C0078

20 keys with different data
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Apr 13, 2007 2:08 am
Reply with quote

dimebag wrote:
20 keys with different data
Does that mean that the maximum number of same keys with different data is 20? So the maximum output record will be 5 * 20 + 2 or 102?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 13, 2007 2:20 am
Reply with quote

Hello,

Maybe 20 sets of 2-digit codes?

I'll not guess on how many 5-position values are possible. . . icon_confused.gif
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: Fri Apr 13, 2007 2:25 am
Reply with quote

dimebag,

So the maximum number of 5-digit values in the output record would be 20?

kkval01val02...val20

What is the RECFM and LRECL of the input file? What is the RECFM and LRECL of the output file?

In the future, I would suggest spending a bit more time carefully explaining the details and rules in your first post to save time.
Back to top
View user's profile Send private message
dimebag

New User


Joined: 29 Mar 2007
Posts: 7
Location: Mexico

PostPosted: Fri Apr 13, 2007 2:49 am
Reply with quote

This is correct:
kkval01val02...val20

For de input file RECFM=FB and LRECL=30 (1-7 key, 8-20 data to repeat), therefore the output data set must have up to LRECL=267 (7+13(20)) and RECFM=FB
Back to top
View user's profile Send private message
dimebag

New User


Joined: 29 Mar 2007
Posts: 7
Location: Mexico

PostPosted: Fri Apr 13, 2007 2:54 am
Reply with quote

Sorry, the input LRECL=20
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: Fri Apr 13, 2007 4:22 am
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE. If you don't have that PTF, you won't get the correct output - ask your System Programmer to install the PTF (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

If you can't get your System Programmer to install the PTF, you could do it in two passes instead of one pass - COPY with INREC to T1 and SPLICE from T1.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file (FB/20)
//OUT DD DSN=...  output file (FB/267)
//TOOLIN   DD    *
SPLICE FROM(IN) TO(OUT) ON(1,7,CH) KEEPNODUPS -
  WITHEACH WITH(21,13) WITH(34,13) WITH(47,13) WITH(60,13) -
  WITH(73,13) WITH(86,13) WITH(99,13) WITH(112,13) WITH(125,13) -
  WITH(138,13) WITH(151,13) WITH(164,13) WITH(177,13) WITH(190,13) -
  WITH(203,13) WITH(216,13) WITH(229,13) WITH(242,13) WITH(255,13) -
  USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFOUTLEN=267,
   IFTHEN=(WHEN=INIT,
      OVERLAY=(268:SEQNUM,2,ZD,RESTART=(1,7))),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+2),OVERLAY=(21:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+3),OVERLAY=(34:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+4),OVERLAY=(47:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+5),OVERLAY=(60:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+6),OVERLAY=(73:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+7),OVERLAY=(86:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+8),OVERLAY=(99:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+9),OVERLAY=(112:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+10),OVERLAY=(125:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+11),OVERLAY=(138:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+12),OVERLAY=(151:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+13),OVERLAY=(164:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+14),OVERLAY=(177:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+15),OVERLAY=(190:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+16),OVERLAY=(203:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+17),OVERLAY=(216:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+18),OVERLAY=(229:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+19),OVERLAY=(242:8,13)),
   IFTHEN=(WHEN=(268,2,ZD,EQ,+20),OVERLAY=(255:8,13))
/*
Back to top
View user's profile Send private message
dimebag

New User


Joined: 29 Mar 2007
Posts: 7
Location: Mexico

PostPosted: Fri Apr 13, 2007 5:23 am
Reply with quote

Thanks for your help Frank, that works fine
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 Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top