simple icetool not working



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

simple icetool not working

Postby prep13 » Tue Aug 24, 2010 3:59 am

Hi Frank/All,

I have learned quite a few things from this forum. So i am thankful to that. I hope to be active now because now i am working on mainframe technologies regularly.

I am facing a problem while using icetool:

I have a file, say FILE1 as follows:
8digit enrollment number 8 digit student ID
example:
1-8(emroll num)         9-16 (student id)         (POSITION)
22222222                  AAL00000
20120100                  AAL00000
20330211                 JAGBRO01
11111111                 SDS00001


Now I have File-2, containing details of each student ID:
POSITION IN FILE ARE AS:

Student id(10-17) details1 detail2           reg num(207-214)     semester indicator(215)    grade indicator(216)
AAL00000             xxx yyyy   zzzzz          M0101010                              H                             S
JAGBR01               sss  ddd   ccccc           M0921311                             Q                             T
TPS0000               aaa fff    vvvvv          M9876789                                                              L


File 2 has unique records for EACH student id. While file can have more than 1 record for a student id, cuz enrollment number can be more than 1 for a student.

Now I want the list of student ID who are there in file-1 (with their enrollment number from file-1) as well as semester indicator, reg num, grade indicator from file-2.

i USED THE BELOW CODE BUT IT IS NOT WORKING. Kindly help:

//T212109 JOB,'student',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),   
//     NOTIFY=&SYSUID                                               
//Step1 EXEC PGM=ICETOOL                                               
//TOOLMSG DD SYSOUT=*                                               
//DFSMSG  DD SYSOUT=*                                               
//IN1     DD DSN=work.file1,DISP=SHR                         
//IN2     DD DSN=work.file2,DISP=SHR                         
//Temp1   DD DSN=work.temp1,disp=(made a new file, FB, RECL=30)
//Temp2   DD DSN=work.temp2,disp= made a new file again
//OUT       DD DSN=work.final, DISP=made a new file
//TOOLIN  DD *                                                     
    COPY FROM(IN1) TO(Temp1) USING(CTL1)                               
    COPY FROM(IN2) TO(Temp1) USING(CTL2)                               
    SPLICE FROM(Temp1) TO(Temp2) ON(1,08,CH) WITH(9,26) WITHALL -         
    COPY FROM (Temp2) TO (OUT) USING(CTL3)   
/*                                                                     
//CTL1CNTL DD *                                                       
    INREC BUILD=(1:1,8,9:9,8,10x,27:C'XX')                                     
//CTL2CNTL DD *                                                       
    INREC BUILD=(1:10,8,8x,17:10,8,25:215,1,26,216,1,27:C'YY')                                     
//CTL3CNTL DD *                                                       
      OUTREC BUILD=(1:1,8,9:9,8,17:17,8,25:25,1,26:26,1)
/*     


But I am getting empty files in Temp1 and so nothing seems working. Kindly elaborate a little ICETOOL and how can I do this.
I am stuck with this for last 4 hours.

Please help me out.
prep13
 
Posts: 5
Joined: Tue Aug 24, 2010 3:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: simple icetool not working

 

Re: simple icetool not working

Postby dick scherrer » Tue Aug 24, 2010 4:24 am

Hello and welcome to the forum,

Suggest you practice with the Code tag to preserve alignment when you post jcl, control statements, data, code, etc.

Is there some reason you did not post the actual jcl used?

It will also help if you post the informational messages (including message id) generated by the run.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: simple icetool not working

Postby prep13 » Tue Aug 24, 2010 4:56 am

I was not aware of Code tag (thanks for telling me). I do not have ISPF at my home. I get to use them in my labs. So i was not able to paste the actual JCL used. Going onward I will keep this in mind and will try to post the actual JCL used.
Can you help me on this one.

Although it looks like a simple ICETOOL ,

As I can use below code, I do not know why it is not woking:
   COPY FROM(IN1) TO(Temp1) USING(CTL1)                               
    COPY FROM(IN2) TO(Temp1) USING(CTL2)                               
These two will give me something like this:
22222222                  AAL00000                                                                                                       XX
                                AAL00000               M0101010                              H                        S               YY
20120100                  AAL00000                                                                                      S               XX
                                AAL00000               M0101010                              H                                         YY
20330211                 JAGBRO01                                                                                                        XX
                               JAGBR01                  M0921311                             Q                         T               YY
11111111                 SDS00001                                                                                                       XX             
                               TPS00000               M9876789                                                         L             YY             
 
   
 SPLICE FROM(Temp1) TO(Temp2) ON(1,08,CH) WITH(9,26) WITHALL -         
    COPY FROM (Temp2) TO (OUT) USING(CTL3)   

And finally this will gice me the desired result:

22222222                  AAL00000            M0101010                              H                        S
20120100                  AAL00000            M0101010                              H                                     
20330211                 JAGBRO01            M0921311                             Q                         T                   
/*                                                                     
//CTL1CNTL DD *                                                       
    INREC BUILD=(1:1,8,9:9,8,10x,27:C'XX')                                     
//CTL2CNTL DD *                                                       
    INREC BUILD=(1:10,8,8x,17:10,8,25:215,1,26,216,1,27:C'YY')                                     
//CTL3CNTL DD *                                                       
      OUTREC BUILD=(1:1,8,9:9,8,17:17,8,25:25,1,26:26,1)


But where am I going wrong? I am not able to comprehend. Kindly help me on this so that I can start working again on this one. This is just a part and I am feeling that I am too weak in Mainframe as of now. With one month in mainframe, I am still a rookie.
prep13
 
Posts: 5
Joined: Tue Aug 24, 2010 3:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: simple icetool not working

Postby dick scherrer » Tue Aug 24, 2010 5:52 am

Hello,

This is just a part and I am feeling that I am too weak in Mainframe as of now. With one month in mainframe, I am still a rookie.
Not to worry - it takes a while. . . :)

Most of us are still learning too. And will be as long as we persist.

What DISP= is used for the "tempn" files? Temp1 needs to be MOD.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: simple icetool not working

Postby prep13 » Wed Aug 25, 2010 12:17 am

is there any criteria by which we decide which file is going to be the base file and which is the overlay file?
prep13
 
Posts: 5
Joined: Tue Aug 24, 2010 3:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: simple icetool not working

Postby dick scherrer » Wed Aug 25, 2010 1:15 am

Hello,

is there any criteria by which we decide which file is going to be the base file and which is the overlay file?

I don't understand the question. . . :?

Which sort product is being used?

Suggest you copy/paste the real jcl and the informational messages (including the message ids) and post this here. If necessary, copy/paste to a notepad file at work, e-mail it to your home e-addr, and paste it as a reply here.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: simple icetool not working

Postby Frank Yaeger » Wed Aug 25, 2010 1:52 am

prep13,

Please show the output you expect for your input example.

What is the RECFM and LRECL of your input file?

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: simple icetool not working

Postby prep13 » Tue Aug 31, 2010 6:11 am

Actually i was trying to use simple ICETOOL program using SPLICE. I had a one file where I got accounts and ID.
The another file I had containd IDs and some other details. I wanted to make another file in which I have all the IDs that are present in both the file along with all the data corresponding to that particular ID present in both the files.

I am able to do it now. But I have a simple doubt. I always have two files in such splice situations. One we call 'base' and the other 'overlay'. I want to ask if we are free to choose any of the files as our Base file or are there any constraint involved in them.
prep13
 
Posts: 5
Joined: Tue Aug 24, 2010 3:33 am
Has thanked: 0 time
Been thanked: 0 time

Re: simple icetool not working

Postby dick scherrer » Tue Aug 31, 2010 8:24 am

Hello,

Is there some reason you chose not to post the info Frank requested?

Often, answers depend on the release of the product being used.

Now would be a good time to run the job Frank provided and post the output.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: simple icetool not working

Postby Frank Yaeger » Tue Aug 31, 2010 9:49 pm

I always have two files in such splice situations. One we call 'base' and the other 'overlay'. I want to ask if we are free to choose any of the files as our Base file or are there any constraint involved in them.


The first record with a specific key is the base record. The second and subsequent records with the same key are overlay records. You choose the base and overlay files to get the result you want. For example, if one file does not have duplicates and the other does, and you need WITHALL, you would choose the file without duplicates as the first (base) file. Then the base record would be spliced with all of the overlay records with the same key. How you would set up the SPLICE exactly depends on the problem you're trying to solve. Alternatively, JOINKEYS might be a better choice.
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
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post