IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ICETOOL Vs DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Tue Nov 29, 2011 11:09 am
Reply with quote

Hi,

In my organization, the same file is sorted in different order in different steps to create multiple output files which are used for further processing by COBOL programs.

The input file contains million of records. We use DFSORT to achieve the above sorting.

My question is, will it be better in terms of cost and performance to use ICETOOL and multiple control statements to sort the same file in the same step to create multiple files.

I read in this in forum that, using a single step parsing is not advisable as in case the SORT fails on the second control statement, then restarting will perform the first control statement again.

Please advise.

Thanks,
Indrajit
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 29, 2011 4:20 pm
Reply with quote

The short answer is - it depends. Actually, it depends what the sort steps are doing with the data. I'm not sure where did you read this:
Quote:
I read in this in forum that, using a single step parsing is not advisable as in case the SORT fails on the second control statement, then restarting will perform the first control statement again.
- multiple passes on the same data is usually not advised but it all depends if you need the pass or not.

Showing some sample records and the sort-statments in question might help you to get a better answer.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Nov 30, 2011 12:14 am
Reply with quote

Indrajit,

There is usually no significant difference in performance between using multiple DFSORT steps, and using one ICETOOL step with multiple operators, providing they do the same thing.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Nov 30, 2011 5:29 am
Reply with quote

Hi,

go for separate steps, in the event of a failure, you only need to rerun the failed step. Also I assume that you would need 5 times the amount of work space is a single step so the more likelihood of a failure.


Gerry
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Nov 30, 2011 6:05 am
Reply with quote

Quote:
the same file is sorted in different order in different steps to create multiple output files which are used for further processing by COBOL programs.


Are you saying you have one job which sorts the data several times, finishes, and then the jobs executing the Cobol programs kick in?

If yes, you could split the sort steps into seperate jobs. You have scheduler software I assume?

Run the first sort job. On completion,r elease the "Cobol Job" which uses the output of the sort and the next sort Job. Etc until end.

You could ask your storage people what they think about running more than one sort from the same input at the same time (bits might start falling off the drive if you try them all, I don't know, but they should).

Are the existing sort steps doing anything except sorting? (ie, OMIT/INCLUDE, any reformatting of data, anything except a straightforward sort).

If they are just sorts, once the first is complete, you have two datasets, so you can kick-off two sorts, then you'll have four datasets etc. Soon knock 'em away.

If you judiciously choose datasets which are "closest" to the order for the next sort, you'll possible-maybe-perhaps get a quicker sort anyway.

If you let us know a few more details, we might be able to provide clearer advice.
Back to top
View user's profile Send private message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Wed Nov 30, 2011 9:19 am
Reply with quote

The sort steps are simple sort with INCLUDE/OMIT conditions wherein we sort the file based on different fields. In some cases a OUTREC statement is also being used.

There are instances wherein the same file is sorted as many as 20 times in different order in different sort steps.

So what I was thinking is, once the main file is created, have a single job to sort the file and split into different sorted files.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Nov 30, 2011 4:50 pm
Reply with quote

Well, there doesn't seem to be any/much benefit in terms of performance from jamming them all into one step. If you have 20 sorts, sort will read the data 20 times. If you put it into one step with ICETOOL, sort (which is what will be used from Icetool) will read the data 20 times.

If you are sorting a file 20 times, you have to read all the data 20 times - subject to an analysis of the keys/data used which could yield some savings.

If something in the step crashes, you would either have to amend the cards before re-running or run everything that is already finished again.

So, I think the seperate steps might suit better. Are these "steps" all in the same job? If yes, break them into seperate jobs so that the successor jobs can get going as soon as data is ready. If it is already like that, describe what problem you feel there is with the existing approach.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Wed Nov 30, 2011 8:33 pm
Reply with quote

Indrajit_57,
It will be beneficial for all of us if you provide current sort cards and what you are trying to achieve. Without looking at sort card, its a total guess and you are not moving forward.

If you do decide to post sort cards, please provide RECFM/LRECL for all the file(s) and corresponding field position and length affecting sort card.

Thanks,
Back to top
View user's profile Send private message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Tue Dec 06, 2011 2:28 pm
Reply with quote

Here are the details. Note that the same set of files are getting used in PS116 and PS130.

The following output files are used by different COBOL programs for further processing: -

&SYSUID..FFB.TEST.FILE.X16 (Created in PS122)
&SYSUID..FFB.TEST.FILE.X01 (Created in PS124)
&SYSUID..FFB.TEST.FILE.X12.MG (Created in PS130)
&SYSUID.FILE.FINAL (Created in PS139)

Note this entire job takes around 1 hr to complete for 5257784 records.. Is there any way by which we can achieve the tuning by using ICETOOL or any other mechanism. Any direction in this regard will be useful.

//PS116 EXEC PGM=SORT
//*
//*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE1,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE2,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE3,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE4,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE5,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE6,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE7,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE8,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE9,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEA,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEB,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEC,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILED,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEE,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEF,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEG,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEH,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEJ,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEK,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEL,
// DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.FILE.HDTRL,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SORTOF2 DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SORTOF4 DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL.X44,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=1,
INCLUDE=((1,03,CH,EQ,C'000',AND,4,03,CH,EQ,C'000'),OR,
(1,03,CH,EQ,C'999',AND,1,03,CH,EQ,C'999'))
OUTFIL FILES=2,
INCLUDE=((1,03,CH,NE,C'000',AND,4,03,CH,NE,C'000'),AND,
(1,03,CH,NE,C'999',AND,4,03,CH,NE,C'999'),AND,
(8,2,ZD,NE,44))
OUTFIL FILES=4,

INCLUDE=(1,03,CH,NE,C'000',AND,8,2,ZD,EQ,44)
//*
//PS117 EXEC PGM=SORT
//*
//*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.HDTRL,
// DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.HDTRL.SRT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,3,CH,A,4,3,CH,A,7,1,CH,A,8,2,CH,A,10,1,CH,A)
SUM FIELDS=NONE
//*
//PS120 EXEC PGM=SORT
//*
//*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.HDTRL.SRT,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL.X44,
// DISP=SHR
//*
//*
//*
//*
//*
//*
//*
//*
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=(NEW,CATLG,DELETE),
// DSORG=PS,
// SPACE=(CYL,(500,500),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,3,CH,A,10,1,CH,A,7,1,ZD,A,8,02,CH,A,30,19,CH, -
A,11,19,CH,A)

//*
//PS122 EXEC PGM=SORT
//*
//*
//*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.FILE.X16,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(200,200),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SORTOF2 DD DSN=&SYSUID..FFB.TEST.FILE.X50,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(200,200),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SORTOF3 DD DSN=&SYSUID..FFB.TEST.FILE.X51,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(200,200),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,03,CH,A,
8,02,ZD,A,
10,01,ZD,A,
7,01,CH,A,
11,19,CH,A,
30,1,CH,A,
31,3,CH,A,
34,19,CH,A)
OUTFIL FILES=1,
INCLUDE=(8,2,ZD,EQ,0,OR,8,2,ZD,EQ,16,OR,8,2,ZD,EQ,99)

OUTFIL FILES=2,
INCLUDE=((1,03,ZD,EQ,0,AND,4,03,ZD,EQ,0,AND,7,1,ZD,EQ,0),OR,
(1,03,ZD,EQ,999,AND,4,03,ZD,EQ,999,AND,07,1,ZD,EQ,9),OR,
(7,03,CH,EQ,C'X50'))

OUTFIL FILES=3,
INCLUDE=((1,03,ZD,EQ,0,AND,4,03,ZD,EQ,0,AND,7,1,ZD,EQ,0),OR,
(1,03,ZD,EQ,999,AND,4,03,ZD,EQ,999,AND,7,1,ZD,EQ,9),OR,
(7,03,CH,EQ,C'X51'))


//*
//PS124 EXEC PGM=SORT
//*
//*
//*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X01,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(300,300),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=((7,01,CH,EQ,C'X',AND,8,02,ZD,EQ,01),OR,
(10,01,CH,EQ,C'0',AND,7,01,CH,EQ,C'0'),OR,
(10,01,CH,EQ,C'9',AND,7,01,CH,EQ,C'9'))

//*
//PS130 EXEC PGM=SORT
//*
//*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE1,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE2,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE3,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE4,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE5,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE6,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE7,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE8,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE9,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEA,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEB,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEC,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILED,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEE,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEF,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEG,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEH,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEJ,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEK,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILEL,
// DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.FILE.X12.MG,
// DISP=(NEW,CATLG,DELETE),
// DSORG=PS,
// SPACE=(CYL,(300,300),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SORTOF2 DD DSN=&SYSUID..FFB.TEST.FILE.X13,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(300,300),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
*
OUTFIL FILES=1,
INCLUDE=(8,2,ZD,EQ,0,OR,8,2,ZD,EQ,12,OR,8,2,ZD,EQ,99)
*
OUTFIL FILES=2,
INCLUDE=((7,1,CH,EQ,C'X'),AND,(8,2,ZD,EQ,13),AND,(10,1,ZD,EQ,1))

//*
//****************************************************************
//PS132 EXEC PGM=SORT
//*
//*
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20),RLSE)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.TEMP.FILE1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=SYSDA
//SORTOF2 DD DSN=&&FILE2,
// DISP=(NEW,PASS),
// SPACE=(CYL,(800,800),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=SYSDA,VOL=(,,,16)
//SYSIN DD *
SORT FIELDS=(7,3,BI,A,
10,1,BI,A,
1,3,BI,A,
4,3,BI,A,
11,120,CH,A,
149,4,PD,A)
*
OUTFIL FILES=1,
INCLUDE=(7,1,CH,EQ,C'0')
OUTFIL FILES=2,
OMIT=(7,1,CH,EQ,C'0',OR,
8,2,ZD,EQ,39,OR,
8,2,ZD,EQ,40,OR,
7,1,CH,EQ,C'9',OR,
8,2,ZD,EQ,33,OR,
8,2,ZD,EQ,13)

//*
//PS134 EXEC PGM=SORT
//*
//*
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20))
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SORTIN DD DSN=&&FILE2,
// DISP=(OLD,DELETE)
//SORTOUT DD DSN=&SYSUID..FFB.TEST.TEMP.FILE5,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=(SYSDA,55)
//SYSIN DD *
SORT FIELDS=(7,3,BI,A,10,1,BI,A) //PS135 EXEC PGM=SORT
//*
//*
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20),RLSE)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X33,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,100),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=(10,1,CH,A,1,3,BI,A,11,7,BI,A,4,3,BI,A)
INCLUDE COND=(8,2,ZD,EQ,33,OR,7,1,CH,EQ,C'9')
//*
//PS136 EXEC PGM=SORT
//*
//*
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20),RLSE)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X39,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,100),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=(1,3,BI,A,135,3,PD,A)
INCLUDE COND=(8,2,ZD,EQ,39,AND,1,3,ZD,NE,999)
//*
//PS137 EXEC PGM=SORT
//*
//*
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20),RLSE)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
// DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X40,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,300),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=(SYSDA,45)
//SYSIN DD *
SORT FIELDS=(1,3,BI,A,4,3,BI,A)
INCLUDE COND=(8,2,ZD,EQ,40,OR,
7,1,CH,EQ,C'9')
//*

//PS138 EXEC PGM=SORT
//*
//*
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20),RLSE)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.X13,
// DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X13.SRT,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(300,300),RLSE),
// DCB=(RECFM=FB,LRECL=500)
//SYSIN DD *
SORT FIELDS=(150,3,CH,A,1,3,ZD,A,4,3,ZD,A) //*
//PS139 EXEC PGM=IEBGENER
//*
//*
//SYSUT1 DD DSN=&SYSUID..FFB.TEST.TEMP.FILE1,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE.X33,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE.X13.SRT,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE.X39,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.FILE.X40,
// DISP=SHR
// DD DSN=&SYSUID..FFB.TEST.TEMP.FILE5,
// DISP=SHR
//SYSUT2 DD DSN=&SYSUID.FILE.FINAL,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(500,500),RLSE),
// DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
// UNIT=SYSDA
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 06, 2011 3:24 pm
Reply with quote

Did you read the earlier responses?

It is unlikely that you will see much difference between SORT doing the job and ICETOOL doing the job when the job is the same thing, says Frank Yaeger, so you can rely on that.

If you rationalise the Job, you will be able to start your Cobol programs earlier.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Dec 06, 2011 3:34 pm
Reply with quote

You are really expecting too much...
posting a 400 lines jcl stream is not likely to get You much benevolence icon_wink.gif
Back to top
View user's profile Send private message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Tue Dec 06, 2011 3:42 pm
Reply with quote

That was the very reason, I was reluctant to provide the code. However on sqlcode1 requests, I had provided, what the code is currently doing.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 06, 2011 4:00 pm
Reply with quote

Indrajit_57 wrote:
[...]
SORT FIELDS=COPY
OUTFIL FILES=1,
INCLUDE=((1,03,CH,EQ,C'000',AND,4,03,CH,EQ,C'000'),OR,
(1,03,CH,EQ,C'999',AND,1,03,CH,EQ,C'999'))
OUTFIL FILES=2,
INCLUDE=((1,03,CH,NE,C'000',AND,4,03,CH,NE,C'000'),AND,
(1,03,CH,NE,C'999',AND,4,03,CH,NE,C'999'),AND,
(8,2,ZD,NE,44))
OUTFIL FILES=4,
INCLUDE=(1,03,CH,NE,C'000',AND,8,2,ZD,EQ,44)
[...]

Just a quick wonder about that one.

Perhaps just a typo, as you re-typed everything instead of using paste? :-)
Back to top
View user's profile Send private message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Tue Dec 06, 2011 4:05 pm
Reply with quote

Yes this should be

(1,03,CH,EQ,C'999',AND,4,03,CH,EQ,C'999')
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Dec 06, 2011 4:31 pm
Reply with quote

It would seem that you could at least split the job in two at 130. I'm definitely not going to check that. That at least could get your Cobol programs going about half-an-hour earlier.

Can any of the sort cards for one step be included in another, is that what you really want to know? You have to look at the most likely candidates, and then for a way to present the question so that someone might want to look into it, not as a 400-line lump.
Back to top
View user's profile Send private message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Tue Dec 06, 2011 4:34 pm
Reply with quote

Thanks Bill, I will work on these lines and see what best can be done to bring down the running time.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Wed Dec 07, 2011 12:00 am
Reply with quote

Indrajit_57,
Quote:
However on sqlcode1 requests, I had provided, what the code is currently doing.
To myself, beware of what you ask for. icon_smile.gif

See if below UNTESTED works...
1) you still haven't provided LRECL but I am going to assume input is FB/500.
2) I changed/merged/removed some of the steps with some comments.
3) Why are you creating FFB.TEST.FILE.X12.MG file, as I don't see that being used in this job? Is it used somewhere else? In 1 or 2 places, I see some temp. intermediate files, if you don't use them in other jobs, better to combine them or remove them.
4) For efficiency, you may want to run this job, by your space management team for suggesion on creating output file(s).

Code:
//*
//* CREATE X12.MG AND X13 FILE IN THIS STEP ONLY TO SAVE EXTRA PASS  ****
//*
//PS116 EXEC PGM=SORT
//SORTIN  DD DSN=&SYSUID..FFB.TEST.FILE1,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE2,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE3,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE4,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE5,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE6,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE7,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE8,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILE9,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEA,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEB,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEC,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILED,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEE,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEF,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEG,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEH,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEJ,
//        DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEK,
//           DISP=SHR
//     DD DSN=&SYSUID..FFB.TEST.FILEL,
//        DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.FILE.HDTRL,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(10,10),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF2 DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(500,500),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF4 DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL.X44,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(500,500),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF5 DD DSN=&SYSUID..FFB.TEST.FILE.X12.MG,
//           DISP=(NEW,CATLG,DELETE),
//           DSORG=PS,
//           SPACE=(CYL,(300,300),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF6 DD DSN=&SYSUID..FFB.TEST.FILE.X13,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(300,300),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(507:SEQNUM,10,ZD)),
       IFTHEN=(WHEN=(8,2,ZD,EQ,0,OR,8,2,ZD,EQ,12,OR,8,2,ZD,EQ,99),
               OVERLAY=(505:C'5'),HIT=NEXT),
       IFTHEN=(WHEN=((7,1,CH,EQ,C'X'),AND,(8,2,ZD,EQ,13),AND,(10,1,ZD,EQ,1)),
               OVERLAY=(506:C'6'),HIT=NEXT),
       IFTHEN=(WHEN=((1,3,CH,EQ,C'000',AND,4,3,CH,EQ,C'000'),OR,
                     (1,3,CH,EQ,C'999',AND,1,3,CH,EQ,C'999')),
               OVERLAY=(501:C'1',107:1,3,4,3,7,1,8,2,10,1)),
       IFTHEN=(WHEN=((1,3,CH,NE,C'000',AND,4,3,CH,NE,C'000'),OR,
                     (1,3,CH,EQ,C'999',AND,1,3,CH,EQ,C'999')),
               OVERLAY=(502:C'2')),
       IFTHEN=(WHEN=(1,03,CH,NE,C'000',AND,8,2,ZD,EQ,44),
               OVERLAY=(504:C'4'))
 SORT FIELDS=(507,3,CH,A,510,3,CH,A,513,1,CH,A,514,2,CH,A,516,1,CH,A),EQUALS
 SUM FIELDS=NONE
 OUTFIL FILES=1,INCLUDE=(501,1,CH,EQ,C'1'),BUILD=(1,500)
 OUTFIL FILES=2,INCLUDE=(502,1,CH,EQ,C'2'),BUILD=(1,500)
 OUTFIL FILES=4,INCLUDE=(504,1,CH,EQ,C'4'),BUILD=(1,500)
 OUTFIL FILES=5,INCLUDE=(505,1,CH,EQ,C'5'),BUILD=(1,500)
 OUTFIL FILES=6,INCLUDE=(506,1,CH,EQ,C'6'),BUILD=(1,500)
/*
//*
//* IF YOU ARE NOT USING .DETAIL AND .DETAIL.X44 ANYWHERE IN OTHER JOBS, COMBINE THEM IN PREV ***
//* STEP ONLY. I HAVE KEPT THEM HERE BUT YOU DON'T REALLY NEED SEPARATE FILES                 ***
//*
//PS120 EXEC PGM=SORT
//SORTIN  DD DSN=&SYSUID..FFB.TEST.FILE.HDTRL.SRT,
//           DISP=SHR
//        DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL,
//           DISP=SHR
//        DD DSN=&SYSUID..FFB.TEST.FILE.DETAIL.X44,
//           DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
//           DISP=(NEW,CATLG,DELETE),
//           DSORG=PS,
//           SPACE=(CYL,(500,500),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SYSOUT  DD SYSOUT=*
//SYSIN   DD *
 SORT FIELDS=(1,3,CH,A,10,1,CH,A,7,1,ZD,A,8,02,CH,A,30,19,CH,A,11,19,CH,A),EQUALS
//*
//* .X01 DOESN'T NEED DATA SORTED. SAVING EXTRA PASS.                                          ***
//*
//PS122 EXEC PGM=SORT
//SORTIN DD  DSN=&SYSUID..FFB.TEST.FILE.MERGE,
//           DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.FILE.X16,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(TRK,(200,200),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF2 DD DSN=&SYSUID..FFB.TEST.FILE.X50,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(TRK,(200,200),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF3 DD DSN=&SYSUID..FFB.TEST.FILE.X51,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(TRK,(200,200),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//SORTOF4 DD DSN=&SYSUID..FFB.TEST.FILE.X01,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(300,300),RLSE),
//           DCB=(RECFM=FB,LRECL=500)
//           SYSOUT DD SYSOUT=*
//SYSIN   DD *
 SORT FIELDS=(01,03,CH,A,
              08,02,ZD,A,
              10,01,ZD,A,
              07,01,CH,A,
              11,19,CH,A,
              30,01,CH,A,
              31,03,CH,A,
              34,19,CH,A),EQUALS
 OUTFIL FILES=1,INCLUDE=(8,2,ZD,EQ,00,OR,
                    8,2,ZD,EQ,16,OR,
               8,2,ZD,EQ,99)

 OUTFIL FILES=2,INCLUDE=((1,03,ZD,EQ,0,AND,
                4,03,ZD,EQ,0,AND,
           7,1,ZD,EQ,0),OR,
               (1,03,ZD,EQ,999,AND,
           4,03,ZD,EQ,999,AND,
           7,1,ZD,EQ,9),OR,
               (7,03,CH,EQ,C'X50'))

 OUTFIL FILES=3,INCLUDE=((1,3,ZD,EQ,0,AND,
                4,3,ZD,EQ,0,AND,
           7,1,ZD,EQ,0),OR,
               (1,3,ZD,EQ,999,AND,
           4,3,ZD,EQ,999,AND,
           7,1,ZD,EQ,9),OR,
               (7,03,CH,EQ,C'X51'))

 OUTFIL FILES=4,INCLUDE=((07,01,CH,EQ,C'X',AND,
           08,02,ZD,EQ,01),OR,
               (07,01,CH,EQ,C'0',AND,
           10,01,CH,EQ,C'0'),OR,
               (07,01,CH,EQ,C'9',AND,
           10,01,CH,EQ,C'9',AND))
//*
//* YOU DON'T NEED TO WRITE TEMP AND RESORT AGAIN ON FIRST 2 FIELDS OF THE SAME SORT.         ***
//* TEMP FILE IS ALREADY SORTED ON CORRECT FIELDS. SORTING THEM WITH OTHER TRAILING FIELDS    ***
//* ISN'T GOING TO CHANGE ORIGINAL SORT ORDER.                                                ***
//* ALSO TOOK OUT 7,1,CH,EQ,C'0' AS THEY OMITTED FROM BOTH FILES                              ***
//*
//PS132 EXEC PGM=SORT
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,DISP=SHR
//SORTOF1 DD DSN=&SYSUID..FFB.TEST.TEMP.FILE1,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(500,500),RLSE),
//           DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
//           UNIT=SYSDA
//SORTOF2 DD DSN=&SYSUID..FFB.TEST.TEMP.FILE5,
//           DISP=(NEW,PASS),
//           SPACE=(CYL,(800,800),RLSE),
//           DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
//           UNIT=SYSDA,VOL=(,,,16)
//SYSIN DD *
 INCLUDE COND=(7,1,CH,EQ,C'0')
 SORT FIELDS=(007,003,BI,A,
              010,001,BI,A,
              001,003,BI,A,
              004,003,BI,A,
              011,120,CH,A,
              149,004,PD,A),EQUALS
*
 OUTFIL FILES=1
 OUTFIL FILES=2,OMIT=(8,2,ZD,EQ,39,OR,
                      8,2,ZD,EQ,40,OR,
                      8,2,ZD,EQ,33,OR,
                      8,2,ZD,EQ,13,OR,)
                      7,1,CH,EQ,C'9')
//*
//* AFAIK, NOTHING CAN BE DONE ABOUT .X33,.X39,.X40,.X13 STEPS                                ***
//*
//PS135 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
//          DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X33,
//           DISP=(NEW,CATLG,DELETE),
//           SPACE=(CYL,(100,100),RLSE),
//           DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
//           UNIT=SYSDA
//SYSIN DD *
 INCLUDE COND=(8,2,ZD,EQ,33,OR,7,1,CH,EQ,C'9')
 SORT FIELDS=(10,1,CH,A,1,3,BI,A,11,7,BI,A,4,3,BI,A),EQUALS
//*
//* AFAIK, NOTHING CAN BE DONE ABOUT .X33,.X39,.X40,.X13 STEPS                                ***
//*
//PS136 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD  DSN=&SYSUID..FFB.TEST.FILE.MERGE,
//           DISP=SHR
//SORTOUT DD DSN=&SYSUID..FFB.TEST.FILE.X39,
//           DISP=(NEW,CATLG,DELETE),
//        SPACE=(CYL,(100,100),RLSE),
//        DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
//        UNIT=SYSDA
//SYSIN DD *
 INCLUDE COND=(8,2,ZD,EQ,39,AND,1,3,ZD,NE,999)
 SORT FIELDS=(1,3,BI,A,135,3,PD,A),EQUALS
//*
//* AFAIK, NOTHING CAN BE DONE ABOUT .X33,.X39,.X40,.X13 STEPS                                ***
//*
//PS137 EXEC PGM=SORT
//SORTWK01 DD UNIT=(SYSDA,4),SPACE=(CYL,(20,20),RLSE)
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=&SYSUID..FFB.TEST.FILE.MERGE,
//         DISP=SHR
//SORTOUT  DD DSN=&SYSUID..FFB.TEST.FILE.X40,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(500,300),RLSE),
//            DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
//            UNIT=(SYSDA,45)
//SYSIN DD *
 INCLUDE COND=(8,2,ZD,EQ,40,OR,7,1,CH,EQ,C'9')
 SORT FIELDS=(1,3,BI,A,4,3,BI,A),EQUALS
//*
//* AFAIK, NOTHING CAN BE DONE ABOUT .X33,.X39,.X40,.X13 STEPS                                ***
//*
//PS138    EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=&SYSUID..FFB.TEST.FILE.X13,
//            DISP=SHR
//SORTOUT  DD DSN=&SYSUID..FFB.TEST.FILE.X13.SRT,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(300,300),RLSE),
//            DCB=(RECFM=FB,LRECL=500)
//SYSIN DD *
 SORT FIELDS=(150,3,CH,A,1,3,ZD,A,4,3,ZD,A),EQUALS
//*
//* CHANGE FROM IEBGENER TO ICEGENER AS TO ME, LATER IS MORE EFFICIENT
//*
//PS139 EXEC PGM=ICEGENER
//SYSUT1 DD DSN=&SYSUID..FFB.TEST.TEMP.FILE1,
//          DISP=SHR
//       DD DSN=&SYSUID..FFB.TEST.FILE.X33,
//          DISP=SHR
//       DD DSN=&SYSUID..FFB.TEST.FILE.X13.SRT,
//          DISP=SHR
//       DD DSN=&SYSUID..FFB.TEST.FILE.X39,
//          DISP=SHR
//       DD DSN=&SYSUID..FFB.TEST.FILE.X40,
//          DISP=SHR
//       DD DSN=&SYSUID..FFB.TEST.TEMP.FILE5,
//          DISP=SHR
//SYSUT2 DD DSN=&SYSUID.FILE.FINAL,
//          DISP=(NEW,CATLG,DELETE),
//          SPACE=(CYL,(500,500),RLSE),
//          DCB=(BLKSIZE=0,RECFM=FB,LRECL=500),
//          UNIT=SYSDA
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD DUMMY
//*

Thanks,
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Wed Dec 07, 2011 5:45 am
Reply with quote

Kolusu pointed that I had incorrect position and condition in step PS116. Corrected card as shown below.

SYSIN For PS116
Code:
//SYSIN DD *
 INREC IFTHEN=(WHEN=INIT,OVERLAY=(507:SEQNUM,10,ZD)),
       IFTHEN=(WHEN=(8,2,ZD,EQ,0,OR,8,2,ZD,EQ,12,OR,8,2,ZD,EQ,99),
               OVERLAY=(505:C'5'),HIT=NEXT),
       IFTHEN=(WHEN=((7,1,CH,EQ,C'X'),AND,(8,2,ZD,EQ,13),AND,(10,1,ZD,EQ,1)),
               OVERLAY=(506:C'6'),HIT=NEXT),
       IFTHEN=(WHEN=((1,3,CH,EQ,C'000',AND,4,3,CH,EQ,C'000'),OR,
                     (1,3,CH,EQ,C'999',AND,1,3,CH,EQ,C'999')),
               OVERLAY=(501:C'1',507:1,3,4,3,7,1,8,2,10,1)),
       IFTHEN=(WHEN=((1,3,CH,NE,C'000',AND,4,3,CH,NE,C'000'),OR,
                     (1,3,CH,NE,C'999',AND,4,3,CH,NE,C'999')),
               OVERLAY=(502:C'2')),
       IFTHEN=(WHEN=(1,03,CH,NE,C'000',AND,8,2,ZD,EQ,44),
               OVERLAY=(504:C'4'))
 SORT FIELDS=(507,3,CH,A,510,3,CH,A,513,1,CH,A,514,2,CH,A,516,1,CH,A),EQUALS
 SUM FIELDS=NONE
 OUTFIL FILES=1,INCLUDE=(501,1,CH,EQ,C'1'),BUILD=(1,500)
 OUTFIL FILES=2,INCLUDE=(502,1,CH,EQ,C'2'),BUILD=(1,500)
 OUTFIL FILES=4,INCLUDE=(504,1,CH,EQ,C'4'),BUILD=(1,500)
 OUTFIL FILES=5,INCLUDE=(505,1,CH,EQ,C'5'),BUILD=(1,500)
 OUTFIL FILES=6,INCLUDE=(506,1,CH,EQ,C'6'),BUILD=(1,500)
/*

Thanks,
Back to top
View user's profile Send private message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Wed Dec 07, 2011 4:16 pm
Reply with quote

Thanks sqlcode1. I used the above job and the time is reduced considerbaly. It takes now around 25 min to complete the job.

The only issue that I face now is with X12.MG. In this file the file header and trailer are coming at the end.

000000X120
000000X129
000000Y120
000000Y129
000000Z120
000000Z129
0000000000 -> This should be at the start of the file
001001X121DETAIL RECORDS
9999999999

The expected output is

0000000000
000000X120
000000X129
000000Y120
000000Y129
000000Z120
000000Z129
001001X121DETAIL RECORDS
9999999999
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top