ICETOOL /DFSORT Question.

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Locked
User avatar
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

ICETOOL /DFSORT Question.

Post by Krishna » Tue May 20, 2008 6:19 pm

One of the users has send this request to me.... please answer this question..... This user is doing his post graduation. As as part of his project, he need to work on this task.


-----------------------------------------------------------------

Details of the project


The ICECREAM & UMBRELLA SALES data referred to above is the
SURMSTR.TRDATA2 dataset and the software is DFSORT and
ICETOOL. Note that we originally used SURMSTR.TRDATA. In order to
simplify your tasks summing data (so
that you don't have to deal with overflows yourselves), I've created
SURMSTR.TRDATA2 which has the same
data but increases the number of blanks for some of the columns. The
columns of dataset
SURMSTR.TRDATA2 are as follows:



Field Column range

Shop Location 1,17
Year Location 19,4
Month Location 24,2
Ice cream sales Location 27,7
Umbrella sales Location 35,7



Following reports needs to be created using ICETOOL /DFSORT.

The reports you are asked to generate are the ones I originally told you:

1. For each month (e.g. 1980-1, 2005-7), sum up ice cream
sales...........(completed)
2. For each (location,month) pair, produce an overall sum of ice cream
sales (sum over all years).........(completed)
3. For each month, report the best performing location for ice cream sales.
4. Repeat 1-3 above with the umbrella column instead of ice-cream.


i am also sending you the code that i managed to do,

FIRST QUESTION

//SUR0004D JOB 1,UNIVER,CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID
//TOOL EXEC PGM=ICETOOL,TIME=NOLIMIT,REGION=1024K
//DATA DD DISP=SHR,DSN=SURMSTR.TRDATA2
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSMSG DD SYSOUT=*
//TEMP DD DISP=(MOD,PASS),DSN=&&TEMP,LRECL=41,RECFM=FB,
// SPACE=(24600,(20,1))
//ABCDCNTL DD *
SORT FIELDS=(24,2,ZD,A,19,4,ZD,A,1,17,CH,A)
/*
//TOOLIN DD *
SORT FROM(DATA) TO(TEMP) USING(ABCD)
STATS FROM(TEMP) ON(27,7,ZD)
DISPLAY FROM(TEMP) LIST(SYSMSG) -
TITLE('REPORT') -
HEADER('LOCATION') ON(1,17,CH) -
HEADER('YEAR') ON(19,4,ZD,NOST) -
HEADER('ICECREAM SALES') ON(27,7,ZD) -
BTITLE('MONTH') BREAK(24,2,ZD) -
BTOTAL('MONTHLY SALES')
/*
//

SECOND QUESTION

000001 //SUR0006Z JOB 1,UNIVER,CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID
000002 //TOOL EXEC PGM=ICETOOL,TIME=NOLIMIT,REGION=1024K
000003 //DATA DD DISP=SHR,DSN=SURMSTR.TRDATA2
000004 //TOOLMSG DD SYSOUT=*
000005 //DFSMSG DD SYSOUT=*
000006 //SYSMSG DD SYSOUT=*
000007 //TEMP DD DISP=(MOD,PASS),DSN=&&TEMP,LRECL=41,RECFM=FB,
000008 // SPACE=(24600,(20,1))
000009 //ABCDCNTL DD *
000010 SORT FIELDS=(24,2,ZD,A,1,17,CH,A)
000011 /*
000012 //TOOLIN DD *
000013 SORT FROM(DATA) TO(TEMP) USING(ABCD)
000014 STATS FROM(TEMP) ON(27,7,ZD)
000015 DISPLAY FROM(TEMP) LIST(SYSMSG) -
000016 TITLE('REPORT 2') -
000017 HEADER('LOCATION') ON(1,17,CH) -
000018 HEADER('MONTH') ON(24,2,ZD,NOST) -
000019 HEADER('YEAR') ON(19,4,ZD,NOST) -
000020 HEADER('ICECREAM SALES') ON(27,7,ZD) -
000021 BTITLE('LOCATION') BREAK(1,17,CH) -
000022 BTOTAL('MONTHLY SALES')
000023 /*
000024 //

here we are breaking on the location,is there a better way to do the
second question

i would be very very grate full if you can help us in coding the the
third and forth question and suggesting any changes in the above two
codes two.looking forward for a reply from you as soon as possible.


--------------------------------

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Tue May 20, 2008 9:09 pm

One of the users has send this request to me.... please answer this question..... This user is doing his post graduation. As as part of his project, he need to work on this task.
If this person is doing his post graduate work, he should be quite capable of doing his own assignments. So I'm locking this thread.

If this person wants to learn about DFSORT himself, he can access all of the DFSORT books online at:

www.ibm.com/servers/storage/support/sof ... tmpub.html
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

Locked

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others