MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sort Files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Smith
Beginner


Joined: 07 Apr 2005
Posts: 13
Topics: 5

PostPosted: Tue May 24, 2005 2:33 pm    Post subject: Sort Files Reply with quote

Hi,
I have 2 files, each with record length 5500. File 1 has a date field in it which will be the current date. File 2 has the date field (in same position as File 1) which has 99999999 as the value. My requirement is to find the records which has date < 99999999 and date = 99999999, when the date fields are added. My Sysin card is

SORT FIELDS=(1,18,CH,A,24,4092,CH,A,4117,384,CH,A) -
SUM FIELDS=(19,5,PD) -
OUTFIL FILES=1,INCLUDE=(19,5,PD,LT,99999999), -
OUTREC=(1,195,X'099C',198,5303) -
OUTFIL FILES=2,INCLUDE=(19,5,PD,EQ,99999999), -
OUTREC=(1,195,X'001C',198,5303)

I am not able to execute this using SYNCSORT because the record length is higher than the limit (the LRECL is 5500). We don't have DFSORT installed in our system, so I can't use this. I can achieve the same result using 2 SORT steps, but it is taking more time. Is there any other way to get the output as mentioned above other than SYNCSORT or DFSORT?

Any help on this would be appretiated.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue May 24, 2005 3:22 pm    Post subject: Reply with quote

Quote:

My requirement is to find the records which has date < 99999999 and date = 99999999, when the date fields are added.


I am totally lost with your requirement. what exactly do you mean by " when the date fields are added" ?

All I see from your control cards is that you are sum-sorting on certain fields and splitting into 2 different files.

Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

Also please post the error messages from the sysout.

Thanks

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Smith
Beginner


Joined: 07 Apr 2005
Posts: 13
Topics: 5

PostPosted: Tue May 24, 2005 4:30 pm    Post subject: Reply with quote

Kolusu,
Sorry for the confusion caused. In this sort we are comparing certain fields (1,18,CH,A,24,4092,CH,A,4117,384,CH,A ) and then if these field values are same then we are adding the date fields which starts at column 19 (SUM FIELDS=(19,5,PD) ). If the sum of the fields is less than 99999999 then it means that this record is present only on File1 (because the date in File 1 is the current date which is always less than 99999999) and we are writing these records to another output file . If the sum of the fields is equal to 99999999, then it means that the record is present only on File 2 and we are writing these records to another output file. If the sum of fields is greater than 99999999, then it means that those records are duplicates and we are eliminating those records. I am able to get the desired outputs if the file length is less than 4092. Since my file length is 5500, I am not able to use Syncsort.

I am getting a SOC4 abend when running the JCL. I am not getting any error message in sysout. Please see the Sysout details.

z/OS 1.4
PRODUCT LICENSED FOR CPU SERIAL NUMBER 15388, MODEL 2064 110
SYSIN :
SORT FIELDS=(1,18,CH,A,24,4092,CH,A,4117,384,CH,A) -
SUM FIELDS=(19,5,PD)
OUTFIL FILES=1,INCLUDE=(19,5,PD,LT,99999999),
OUTREC=(1,195,X'099C',198,5303) -
OUTFIL FILES=2,INCLUDE=(19,5,PD,EQ,99999999),
OUTREC=(1,195,X'001C',198,5303)


Thanks,
Smith
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue May 24, 2005 7:25 pm    Post subject: Reply with quote

Quote:

I am getting a SOC4 abend when running the JCL. I am not getting any error message in sysout. Please see the Sysout details.


Smith,

hmm SOC4 abend ? There is nothing wrong with your control cards. How many records do you have in your input file? I have seen instances when syncsort abends with SOC4 when it did not have enough sortwork datasets.

Try providing more sortwork datasets and you also supply the FILSZ parm.

FILSZ indicates the actual (FILSZ=n) or estimated (FILSZ=En) decimal number of records to be sorted, taking into account all record additions and deletions due to an E14 or E15 exit routine, the INCLUDE/OMIT control statement, the SUM control statement and the SKIPREC and STOPAFT parameters.

FILSZ=n instructs SyncSort to terminate with an error message unless exactly n records are to be sorted. Since the number of records SUMed in Phase 1 is indeterminate and may not be reproducible, much less predictable, only the estimated En value should be used if a SUM control statement is present.

So try this

Code:

//STEP0100 EXEC PGM=SORT,PARM='MAXSORT,FILSZ=E20M,MINWKSP=60'


FILSZ=E20M implies estimated 20 million SORTIN records.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Smith
Beginner


Joined: 07 Apr 2005
Posts: 13
Topics: 5

PostPosted: Tue May 24, 2005 8:38 pm    Post subject: Reply with quote

Kolusu,
I gave more sort work cards and gave FILSZ PARM. But still I am getting SOC4. I think it is because of my file length. My file length is 5500 and I did a Quick watch on SORT and it says:

Possible values for 'type' and the max length for each field type are:

AC - 1 to 256 bytes - EBCDIC translated to ASCII before sort or merge
AQ - 1 to 256 bytes - character, but alternate collating sequence set
by ALTSEQ= or default at install time
ASL- 2 to 256 bytes - leading ASCII separate sign (+ or -)
AST- 2 to 256 bytes - trailing ASCII separate sign (+ or -)
BI - 1 to 4092 bytes- binary (usable for any type of field)
CH - 1 to 4092 bytes- character


I think the maximum limit is 4092 bytes for SYNCSORT. If it is a problem with file length, is there any other way I can achieve these results? We don't have DFSORT and we cannot use this.

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


Joined: 07 Apr 2005
Posts: 13
Topics: 5

PostPosted: Wed May 25, 2005 7:18 pm    Post subject: Reply with quote

Kolusu,
I saw a post in this website under the subject "Problem with SORT when LRECL > 4092 Bytes". I think I am also facing the exact same problem? Is there any way to overcome this syncsort limitation?

Your help is appretiated.

Thanks,
Smith
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group