MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help needed in ICETOOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Ambi
Beginner


Joined: 14 Jun 2005
Posts: 5
Topics: 3

PostPosted: Wed Jul 20, 2005 10:28 am    Post subject: Help needed in ICETOOL Reply with quote

Hi,

I am trying in ICETOOL to merge records and prepare a output file. But I have failed in some scenarios . My input data looks like this ....
Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
         ENTITY:SEMI0
    SERIAL NO           AMOUNT X       DIFF AMOUNT
    11111               10.00                             
                                       2222.00
    11112               10.00                             
                                       3333.00

         ENTITY:SEMI0
    DEPT NO             AMOUNT         DIFF AMOUNT
    11011               80.00                           
                                       8888.00
         ENTITY:SEMI1
    SERIAL NO           AMOUNT X       DIFF AMOUNT
    22222               20.00                             
                                       4444.00
         ENTITY:SEMI1
    DEPT NO             AMOUNT         DIFF AMOUNT
    22202               80.00                           
                                       7777.00


   


I am expecting a output file which contains Entity + Serail/dept + no + diff amount. The sample output file.

Code:

SEMI0 SERIAL 11111 2222.00
SEMI0 SERIAL 11112 3333.00
SEMI0 DEPT   11011 8888.00
SEMI1 SERIAL 22222 4444.00
SEMI1 DEPT   22202 7777.00


Please advise me , is it possible to do in ICETOOL.

Cheers,
Ambi
Back to top
View user's profile Send private message
Alain Benveniste
Beginner


Joined: 04 May 2003
Posts: 92
Topics: 4
Location: Paris, France

PostPosted: Thu Jul 21, 2005 7:39 am    Post subject: Reply with quote

Ambi,

Here is the jcl that do want you want
Code:

//STEP0001 EXEC PGM=ICETOOL
//DFSMSG   DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//IN       DD *
         ENTITY:SEMI0
    SERIAL NO           AMOUNT X       DIFF AMOUNT
    11111               10.00
                                       2222.00
    11112               10.00
                                       3333.00
         ENTITY:SEMI0
    DEPT NO             AMOUNT         DIFF AMOUNT
    11011               80.00
                                       8888.00
         ENTITY:SEMI1
    SERIAL NO           AMOUNT X       DIFF AMOUNT
    22222               20.00
                                       4444.00
         ENTITY:SEMI1
    DEPT NO             AMOUNT         DIFF AMOUNT
    22202               80.00
                                       7777.00
/*
//TOOLIN   DD *
  COPY FROM(IN) TO(OUT1) USING(ICE0)
  SPLICE FROM(OUT1) TO(OUT2) ON(81,5,ZD) -
         WITH(1,85) -
         WITHALL
  COPY FROM(OUT2) TO(OUT3) USING(ICE1)
  SPLICE FROM(OUT3) TO(OUT4) ON(81,5,ZD) -
         WITH(14,5) WITH(20,7) -
         WITHALL USING(ICE2)
  SPLICE FROM(OUT4) TO(OUTX) ON(81,5,ZD) -
         WITH(20,7) -
         WITHEACH USING(ICE3)
/*
//OUT1     DD DSN=&&OUT1,
//            DISP=(NEW,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1,0),RLSE),
//            DCB=(DSORG=PS,RECFM=FB,LRECL=90)
//OUT2     DD DSN=&&OUT2,
//            DISP=(NEW,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1,0),RLSE),
//            DCB=(DSORG=PS,RECFM=FB,LRECL=90)
//OUT3     DD DSN=&&OUT3,
//            DISP=(NEW,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1,0),RLSE),
//            DCB=(DSORG=PS,RECFM=FB,LRECL=90)
//OUT4     DD DSN=&&OUT4,
//            DISP=(NEW,DELETE,DELETE),
//            UNIT=SYSDA,
//            SPACE=(TRK,(1,1,0),RLSE),
//            DCB=(DSORG=PS,RECFM=FB,LRECL=90)
//OUTX     DD SYSOUT=*
//ICE0CNTL DD *
  INREC IFTHEN=(WHEN=INIT,
                OVERLAY=(81:SEQNUM,5,ZD)),
        IFTHEN=(WHEN=(10,7,CH,EQ,C'ENTITY:'),
                OVERLAY=(81:SEQNUM,5,ZD,17,5)),
        IFTHEN=(WHEN=NONE,
                OVERLAY=(86:SEQNUM,5,ZD,
                         81:81,5,ZD,SUB,86,5,ZD,M11,LENGTH=5))
/*
//ICE1CNTL DD *
  INREC IFTHEN=(WHEN=(5,6,CH,EQ,C'SERIAL'),
                BUILD=(1:86,5,7:C'SERIAL',81:81,5)),
        IFTHEN=(WHEN=(5,4,CH,EQ,C'DEPT:'),
                BUILD=(1:86,5,7:C'DEPT',81:81,5)),
        IFTHEN=(WHEN=(5,5,CH,NE,C'     '),
                BUILD=(14:5,5,81:81,5)),
        IFTHEN=(WHEN=(5,5,CH,EQ,C'     '),
                BUILD=(20:40,7,81:81,5))
/*
//ICE2CNTL DD *
  OUTFIL FNAMES=OUT4,
         IFTHEN=(WHEN=(14,5,CH,NE,C'     '),
                 OVERLAY=(81:SEQNUM,5,ZD)),
         IFTHEN=(WHEN=(14,5,CH,EQ,C'     '),
                 OVERLAY=(81:SEQNUM,5,ZD))
/*
//ICE3CNTL DD *
  OUTFIL FNAMES=OUTX,
         OUTREC=(1,80)
/*

OUTX gives
Code:

SEMI0 SERIAL 11111 2222.00
SEMI0 SERIAL 11112 3333.00
SEMI0 DEPT   11011 8888.00
SEMI1 SERIAL 22222 4444.00
SEMI1 DEPT   22202 7777.00
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group