This will produce a RECFM=FB, LRECL=43 data set for SORTOUT with one record like this (for the example, the input file has 19 records):
Code:
IBM CORPORATION 1901/30/2003
You can change the format of the count using DFSORT's COUNT=(edit) option. If you want the count in a different format, let me know what you want and I'll show you how to get it. _________________ 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
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
I was trying to resolve but I don't find the error onoutrec statements and control statement..Can u help me on this
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Fri Jan 31, 2003 7:14 am Post subject:
Anand,
Your control cards should start in Pos 2. I am sorry to inform you that frank's example will not work in your case , as you have syncsort which does not support removecc functionality as DFSORT does. I will post the Syncsort solution a little bit later as I am in a hurry. But till then you can try with the following control cards.
Thanks for ur respone.. It worked but the output file is having same lrec as input.. But I want lrecl should be 43...Can u tellme where should I make change..
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Fri Jan 31, 2003 9:55 am Post subject:
Anand,
Quote:
Instead of hardcoding string.. I need to capture the string which exist in the last record of the input file starts from 30 to 70.
So that is 40 bytes for the title, and you want 8 bytes for the count and 10 bytes for the date which is a total of 58 bytes. But in the later posts you state that you want only 43 bytes. can you please clarify as to what you want.
I am posting the solution based on your new requirement, ie. take the string from the last record of the input file from pos 30 thru 40 .
A brief explanation of the job.
using inrec we take the bytes 30 thru 70 and we add a seqnum to all the records and also 10 bytes for date.
Now we sort on the seqnum descending so that the last record will be the first record.
Using ENDREC feature we write out only 1 record which is the last record in the file.using the trailer option we add the date at 49 position.
Since trailer1 is a report feature it will create the dataset with an ansi carriage character in the first byte.i.e if the input file is fb then it will be created as FBA.so now the file T1 looks as follows:
Code:
1ANAND CORPORATION LIMITED 00000019
1 01/31/2003
DFSORT's REMOVECC option can remove this carriage control character and create an FB file. But since you have Syncsort which doesn't support REMOVECC, you need the second operator to take in the above file and make it a single record stripping off the ansi carriage control character in the first byte.The output looks like this
Thanks a lot for ur solution.. I talked with the user and she wants to hardcode that instead of capturing that from the input file.. The solution that u have given for the user abend had worked out..
This will create a 44 byte file as the first byte will be the ansi carriage control character. As I said earlier, if the input file format is FB the output file created will be FBA. so if you want to strip off the ansi carriage control character then use the following JCL. The first step creates the report and the next step strips the ansi carriage control character.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Jan 31, 2003 11:33 am Post subject:
Anand,
As Kolusu pointed out, the WERxxxs messages mean you have Syncsort. DFSORT supports the REMOVECC option, but Syncsort doesn't. DFSORT has ICExxxs messages.
(Seems like 90% of the posts on this Forum go up while I'm away from work on the West Coast of the U.S. here. By the time I get into work, all the questions have been answered.) _________________ 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
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