Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Exit routines in ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dhanasugumar

New User


Joined: 08 Apr 2010
Posts: 6
Location: India

PostPosted: Thu Apr 08, 2010 6:36 pm    Post subject: Exit routines in ICETOOL
Reply with quote

Hi,

Is it possible to invoke an E35/E15 exit routines in ICETOOL as we do in SORT.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 08, 2010 8:07 pm    Post subject:
Reply with quote

Good first question, but why are you asking?
I'm wondering what sort of record changing you need that can't be done with the provided facilities?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 08, 2010 9:39 pm    Post subject:
Reply with quote

Quote:
Is it possible to invoke an E35/E15 exit routines in ICETOOL as we do in SORT.


You can use E15 and E35 exits with the SORT and COPY operators of DFSORT's ICETOOL. For other operators, it depends.

You need to give a clearer explanation of what you're trying to do and why you need exits to do it.
Back to top
View user's profile Send private message
dhanasugumar

New User


Joined: 08 Apr 2010
Posts: 6
Location: India

PostPosted: Fri Apr 09, 2010 10:59 am    Post subject: Reply to: Exit routines in ICETOOL
Reply with quote

Scenario: Am creating two outputs from a single sort in. The input has a control record and I want a control record to be created in both the sort outs. When I use E35 to execute my routine, its not creating a new control in the output.

But the same routine in E35 is creating a control record as expected when there is ONE sortout.

Below is the SYSIN I used.

Code:
SORT FIELDS=(1,7,CH,A), 
SIZE=E99999999,DYNALLOC=(SYSDA,32)                   
MODS E35=(crcntl,100,MODLIB,N)                     
OUTFIL FILES=1,                                       
OMIT=((1,1,CH,EQ,C'T',OR,                         
       1,1,CH,EQ,C'P'),AND,31,2,CH,EQ,C'01')       
OUTFIL FILES=2,                                       
INCLUDE=((1,1,CH,EQ,C'T',OR,                     
           1,1,CH,EQ,C'P'),AND,31,2,CH,EQ,C'01')
Back to top
View user's profile Send private message
dhanasugumar

New User


Joined: 08 Apr 2010
Posts: 6
Location: India

PostPosted: Fri Apr 09, 2010 5:16 pm    Post subject:
Reply with quote

My original file has 12 amount fields in it. Control record has record count and SUM of Amount (irrespective of the values of other fields) in it.
Ex:
rec1abc 100
rec2cde 200
rec3efg 100
rec4ghi 200

Control record should be
4 600
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 09, 2010 9:25 pm    Post subject:
Reply with quote

You're not explaining clearly what you want to do or what is happening exactly, so it's difficult to help you. Your original question was about exits in ICETOOL, but all you show is DFSORT control statements, so I don't know what, if any, ICETOOL operator you're using.

You haven't explained clearly what you're trying to do. I don't know what your E35 exit does or if you even need it.

I don't know if you're using OUTFIL statements in one case and no OUTFIL statements in the other case, or if you're using OUTFIL statements in both cases.

If you explain things more clearly, I can probably help you. Showing your complete job, messages, input and expected output, etc would help.
Back to top
View user's profile Send private message
dhanasugumar

New User


Joined: 08 Apr 2010
Posts: 6
Location: India

PostPosted: Mon Apr 12, 2010 3:37 pm    Post subject:
Reply with quote

Hi Frank,

Sorry for the unclear request.

Currently I have been using SORT and exit E35 to create a control record in the output file. I have a batchcob(CRCNTL) written to create a control record with record count and sum of fields.
Input file:
rec1abc 100 220
rec2cde 200 120
rec3abc 100 200
rec4abc 100 456
rec5ghi 200 345
000005 700 1341

When i use the below sysin, my exit does create the control record as shown below and that is what is expected.

SORT FIELDS=(5,3,CH,A),
SIZE=E99999999,DYNALLOC=(SYSDA,32)
MODS E35=(crcntl,100,MODLIB,N)
INCLUDE COND=(5,3,CH,EQ,C'ABC')

Output file is:
rec1abc 100 220
rec3abc 100 200
rec4abc 100 456
000003 300 876

When i try creating two output files from a sortin, control record is not getting created. I have used the below code. (I believe the exit routine is not getting executed in the below code)

SORT FIELDS=(5,3,CH,A),
SIZE=E99999999,DYNALLOC=(SYSDA,32)
MODS E35=(crcntl,100,MODLIB,N)
OUTFIL FILES=1,
INCLUDE =(5,3,CH,EQ,C'ABC')
OUTFIL FILES=2,
OMIT=(5,3,CH,EQ,C'ABC')

Outfile1:
rec1abc 100 220
rec3abc 100 200
rec4abc 100 456

000003 300 876 - this control is not getting created in the final output file1

Outfile2:
rec2cde 200 120
rec5ghi 200 345

000002 400 465 - this control is not getting created in the final output file2

Since i did not get the expected result using SORT, I thought of trying with ICETOOL. Is there any possibilitis of creating the control record as shown above using SORT or ICETOOL. (My original file has around 25 such fields to be summed up in the control record)
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Apr 12, 2010 4:02 pm    Post subject:
Reply with quote

I really don't think that you need an exit for this, generating totals in a trailer record is a basic sort function and doing it for two outputs is as simple as doing it for one.

Take a look at Record Count and Sum Amount for each type of data for a starting point.
Back to top
View user's profile Send private message
dhanasugumar

New User


Joined: 08 Apr 2010
Posts: 6
Location: India

PostPosted: Mon Apr 12, 2010 6:48 pm    Post subject:
Reply with quote

I have to create two sortouts and they both have different INCLUDE/OMIT condition. Can you give some details on how to use trailer in this situation?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Apr 12, 2010 9:24 pm    Post subject: Reply to: Exit routines in ICETOOL
Reply with quote

dhanasugumar,

The following DFSORT JCL will split the input file into 2 files and give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                             
----+----1----+----2----+----3----+----4----+----5----+----6-
REC1ABC 100 220                                             
REC2CDE 200 120                                             
REC3ABC 100 200                                             
REC4ABC 100 456                                             
REC5GHI 200 345                                             
000005 700 1341                                             
//OUTABC   DD SYSOUT=*                                       
//OUTXXX   DD SYSOUT=*                                       
//SYSIN    DD *                                             
  OMIT COND=(1,1,ZD,EQ,0)                                   
  SORT FIELDS=(5,3,CH,A),EQUALS                             
                                                             
  OUTFIL FNAMES=OUTABC,REMOVECC,INCLUDE=(5,3,CH,EQ,C'ABC'), 
  TRAILER1=(COUNT=(M11,LENGTH=6),X,                         
            TOT=(9,3,ZD,M11,LENGTH=6),X,                     
            TOT=(13,3,ZD,M11,LENGTH=6))                     
                                                             
  OUTFIL FNAMES=OUTXXX,SAVE,REMOVECC,                       
  TRAILER1=(COUNT=(M11,LENGTH=6),X,                         
            TOT=(9,3,ZD,M11,LENGTH=6),X,                     
            TOT=(13,3,ZD,M11,LENGTH=6))                     
//*


OUTABC will have
Code:

REC1ABC 100 220       
REC3ABC 100 200       
REC4ABC 100 456       
000003 000300 000876 


OUTXXX will have

Code:

REC2CDE 200 120     
REC5GHI 200 345     
000002 000400 000465


CICS guy ,

I think OP wanted to split the input into 2 files and then perform the report writing.
Back to top
View user's profile Send private message
dhanasugumar

New User


Joined: 08 Apr 2010
Posts: 6
Location: India

PostPosted: Thu Apr 15, 2010 5:14 pm    Post subject:
Reply with quote

Hi Skolusu,

Thanks for your response. It worked for me the way I want.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EXIT or RETURN cvnlynn CLIST & REXX 16 Wed Jul 19, 2017 2:50 am
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us