Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Jan 31, 2003 12:08 pm Post subject:
As a sanity check, both of the jobs above produce a RECFM=FBA, LRECL=44 data set with DFSORT as well. They should because OUTREC=(43X) and INREC FIELDS=(43X) set the SORTOUT LRECL to the length of the reformatted record + 1 byte for the ANSI cc, so that's 43 due to the 43 blanks + 1 = 44. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 07 May 2003 Posts: 7 Topics: 2 Location: Seattle
Posted: Wed May 07, 2003 3:20 pm Post subject:
Hi all -
I've looked and don't see a posting that fits my needs quite exactly(they dance all around it though..)
Our shop has Syncsort only.
I've created a data file, and with Syncsort I want to sort it, rearrange it, include only certain records, and add a 1-line trailer at the bottom of the file that is simply the total record count.
I can accomplish the 1st 3 easily with syncsort but am having trouble trying to figure out how to create the trailer. The examples admirably show how to create a =separate= trailer file but that's not what I need.
E.g. I want the file to look more or less like this:
Joined: 26 Nov 2002 Posts: 12399 Topics: 75 Location: San Jose
Posted: Wed May 07, 2003 4:58 pm Post subject:
zornet57,
The following JCL will give you the desired results with a 8 byte count with leading zeroes supressed as the last record.However I want to add that the output created will be FBA. Since we are using the report feature TRAILER1, it will add the print character. so if your input file has an LRECL OF 80 and is of RECFM FB then the sortout will have an LRECL OF 81 and RECFM of FBA.DFSORT has a feature 'REMOVECC' which will eliminate the printing of carriage control character,but unfortunately syncsort does not support it.If you want carriage control to be removed then let me know and I will post another solution.
Joined: 07 May 2003 Posts: 7 Topics: 2 Location: Seattle
Posted: Wed May 07, 2003 5:57 pm Post subject:
Thanks kolusu!
I tried it, though, and got this message:
WER107A SORTOUT RECFM INCOMPATIBLE WITH REPORT WRITING
So, I changed my SORTOUT DD RECFM parm to FBA and it worked fine. However, as you mentioned, the carriage control character is now in the entire file and I need to remove it. I guess one answer is to do a second sort and get rid of it.... but do you have another solution?? Thanks again!
Joined: 26 Nov 2002 Posts: 12399 Topics: 75 Location: San Jose
Posted: Thu May 08, 2003 8:50 am Post subject:
Zornet,
The following JCL will give you the desired results. A brief explanation of the job. The first step copies the input to output as is and also creates another file with just the total no: of records in the file. This file will have the carriage control and will have the RECFM FBA.
Now the second step takes in the count file and strips the carriage control character and APPENDS(disp=mod) it to the output file which we created in the previous step.
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
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