Help on Icetool Controlcard



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Help on Icetool Controlcard

Postby samvithb » Tue Jan 14, 2014 7:44 pm

Hi All,

I have an input dataset of DCB VB/260 and it contains the below information :


00:04:18.59 S0077774 00000211  GSVC100W (TPPT) TRANEND TRANS ABENDS AW45 ASRA NO
                 572 00000211           V= 1 W= 1 P= 1 UPPER 0.000000           
                 572 00000211           BCCICSPE AW45 87927 * ZMQKMD           
                 572 00000211           Desc='Transaction abends '             
12:50:10.64 S0074087 00000000  +GSVC201E (Task) Tran=E3A5 Task= 6463 Code=????
                               Resource=*                                     
12:50:10.64 S0074098 00000000  +GSVC201E (Task) Tran=E3A5 Task= 34137 Code=????
                                Resource=*                                     
12:50:10.64 S0074087 00000010  GSVC100W (TPPT) TRANEND TRANS ABENDS E3A5 ???? N
                 485 00000010           V= 1 W= 1 P= 1 UPPER 0.000000         
                 485 00000010           OCCICSPU E3A5 6463 * ZWWEB01           
                 485 00000010           Desc='Transaction abends '   



1. The starting position of the above record in VB input is 27(I mean the value 00:04:18.59 starts from position 27)
2. Input is a huge file and apart from the above information it has many other informations

My Requirement :

1. I want help in writing a Icetool control card.
2. It has to read the entire input and find the records with the keyword GSVC(GSVC is in position 57 of my VB input) and should place it in output along with the next three lines


My Required output :

00:04:18.59 S0077774 00000211  GSVC100W (TPPT) TRANEND TRANS ABENDS AW45 ASRA NONE PROBLEM 572
                 572 00000211           V= 1 W= 1 P= 1 UPPER 0.000000           
                 572 00000211           BCCICSPE AW45 87927 * ZMQKMD           
                 572 00000211           Desc='Transaction abends '     
12:50:10.64 S0074087 00000010  GSVC100W (TPPT) TRANEND TRANS ABENDS E3A5 ???? N
                 485 00000010           V= 1 W= 1 P= 1 UPPER 0.000000         
                 485 00000010           OCCICSPU E3A5 6463 * ZWWEB01           
                 485 00000010           Desc='Transaction abends '   



With the below control card I am able to fetch the records, but I want the next three lines of the same record to be placed in output

My Copy Statement : COPY FROM(IN) TO(OUT) USING(GSVC)

My Controlcard :
OPTION VLSCMP
INCLUDE COND=(62,4,SS,EQ,C'GSVC')
OUTFIL VTOF,BUILD=(31,100,255:X)

My output file is of FB/255. Can somebody help me in this regard.

Thanks N Regards
Samvith
samvithb
 
Posts: 5
Joined: Tue Jan 14, 2014 6:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Help on Icetool Controlcard

 

Re: Help on Icetool Controlcard

Postby dick scherrer » Tue Jan 14, 2014 8:10 pm

Hello and welcome to the forum,

Have you verified your system uses DFSORT? Is there some particular reason to use ICETOOL?

I believe you can do what you want with SORT. I also believe there are some examples of doing what you want in previous topics here on the forum.
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: Help on Icetool Controlcard

Postby samvithb » Tue Jan 14, 2014 8:18 pm

Hi Dick,

Thank you in welcoming me. Yes, our system supports DFSORT. Can you please tell me where do I need to check for the previous examples. I will put my efforts to work with those examples.

Thanks N Regards
samvithb
 
Posts: 5
Joined: Tue Jan 14, 2014 6:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Help on Icetool Controlcard

Postby dick scherrer » Tue Jan 14, 2014 9:24 pm

Hello,

Can you please tell me where do I need to check for the previous examples.
At the top of the page is a "search" feature. Suggest you look for PUSH and GROUP in the DFSORT/ICETOOL/ICEGENER part of the forum.
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: Help on Icetool Controlcard

Postby NicC » Wed Jan 15, 2014 12:04 am

I would suggest you extend your stirng to match against as you have GSVC100W and GSVC201E but only the 100W records seem to match your criteria of having 3 records after them and your sample output appears to not want the 201E records.

Edit: please use the code tags to display your data. I have coded it for you and we can now see that the GSCV100W records start in a different column from the GSCV201E records. If you do not know how to use the code tags then lok around the forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Help on Icetool Controlcard

Postby samvithb » Wed Jan 15, 2014 12:53 pm

Hi Nicc,

Thank you for your help in coding the tags. I have to learn on how to do it and will learn shortly.

Yes, I don't want the GSVC201E record and the subsequent line of it. I just wanted the records of GSVC100W and the subsequent 3 lines to be placed in output.

Thanks N Regards
Samvith
samvithb
 
Posts: 5
Joined: Tue Jan 14, 2014 6:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Help on Icetool Controlcard

Postby BillyBoyo » Wed Jan 15, 2014 1:20 pm

OPTION VLSCMP
INCLUDE COND=(62,4,SS,EQ,C'GSVC')
OUTFIL VTOF,BUILD=(31,100,255:X)


None of your output contains records less than 69 bytes long, so since you don't need them you can deal with them in OMIT/INCLUDE COND= and drop the VLSCMP

You have a single value (GSVC) which you search for in a field which is the same length. Use CH instead of SS (Sub-string Search).

You have 155 bytes of blanks on each output record. Is that necessary?

Also take NicC's comments into account.

You don't need ICETOOL to do this, a simple COPY in SORT will also work.

  OPTION COPY
  OMIT COND=(1,2,BI,LT,69)
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(62,8,CH,EQ,C'GSVC100W'),RECORDS=4,
                    PUSH=(5:62,8)
   
  OUTFIL INCLUDE=(5,8,CH,EQ,C'GSVC100W'),
       VTOF,BUILD=(31,100,255:X)           


This defines a group of four records with a particular starting value. The starting value is copied to position five on each of the records of the group, and then only records with that value in position five are included in the OUTFIL.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Help on Icetool Controlcard

Postby samvithb » Wed Jan 15, 2014 2:46 pm

Thanks Billy, for the above controlcard and suggestions. This controlcard worked out for me very well. Thanks once again.

Actually, as Dick suggested, I was looking on the older posts and in one of the posts I noticed commnents like"people post the query and wait for answers. They won't put their efforts in reading manuals". I felt it's true and I don't want be one of them and hence started searching for topics and trying to understand on PUSH/Group concept through manuls. In the mean time I saw your reply and tested it.

Thanks everyone for your support and suggestions.

Regards
Samvith
samvithb
 
Posts: 5
Joined: Tue Jan 14, 2014 6:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Help on Icetool Controlcard

Postby BillyBoyo » Wed Jan 15, 2014 3:44 pm

Samvith,

That is certainly a very good way to approach it. Find an example that you don't understand but which works. Then find out why it works. Then you'll understand, and be able to apply it to other situations.

I also suggest you look at using symbols/SYMNAMES. With these you give names to fields, rather than just the traditional start,length,type in the control cards.

//SYMNAMES DD *
  RECORD-LENGTH,1,2,BI
  PUSHED-MESSAGE,5,8,CH
  DATA-FOR-OUTPUT,31,100,CH
  MESSAGE-CODE,62,8,CH
  MAXIMUM-OUTPUT-BYTE,255,1,CH
  MESSAGE-NEEDS-REPORTING,C'GSVC100W'
  MINIIMUM-LENGTH-FOR-CONTROL-FIELD,69
//SYMNOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OMIT COND=(RECORD-LENGTH,LT,MINIIMUM-LENGTH-FOR-CONTROL-FIELD)
  INREC IFTHEN=(WHEN=GROUP,
                     BEGIN=(MESSAGE-CODE,
                           EQ,
                            MESSAGE-NEEDS-REPORTING),
                     RECORDS=4,
                     PUSH=(PUSHED-MESSAGE:MESSAGE-CODE)
   
  OUTFIL INCLUDE=(PUSHED-MESSAGE,
                 EQ,
                  MESSAGE-NEEDS-REPORTING),
       VTOF,BUILD=(DATA-FOR-OUTPUT,MAXIMUM-OUTPUT-BYTE:X) 


This is the same set of control cards. I believe they are very much easier to read and maintain. Note that there is now no duplication of constants or record positions, and you know what everything is. Have a look, I think it'll save you much time - if your colleagues are OK with you knowing more than they do :-)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Help on Icetool Controlcard

Postby samvithb » Thu Jan 16, 2014 7:22 pm

Hi Billy,

The SYNAMES control card is also working fine for my requirement. Really, I learned a new concept through you in this forum. All these days I was using the traditional way of control cards and this is something new to me. Goingforward, I will try to use SYMNAMES for my future requirements.

Thanks once again.

Regards
Samvith
samvithb
 
Posts: 5
Joined: Tue Jan 14, 2014 6:40 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post