Posted: Thu Jan 05, 2006 10:00 am Post subject: icetool select clause on VB file
Hi,
I have to select the duplicates into saverest file and the first occurence of all the records to FIL1
SELECT FROM(INFILE) TO(FILE1) ON(29,10,CH) FIRST USING(CTL1)-
DISCARD(SAVEREST)
the problem is the INFILE is VB and have header ,detail recs and trailer. So i need to omit the header and trailer for selecting. I need to check only the duplicates in the details records and to get the 1st occurence of all detail rec in FILE1 and the duplicate occurences in SAVEREST.
The issue is how to give the VLSHRT condition and create a trailer records and all for the select clause.
The infile is selected on the basis of col 19 and 20 ie AB,CD,EF and the new trailer needs to created with new counts.
Is it possible. I read that the select needs lot of memory to execute.My VB file is of length 32756 so is this approach advisable??Will it take more time to execute??
yes,i need to keep the original header.For doing this what i initillay done was extracting the header record by stopaft=1 in the sort step before and thought of appending it to detail record. But here when using select can we use the option STOPAFT=1.
the date can be a previous date also,thts why we need to retain it.
No i didnt RDW,so then it will be colum 23 and 24.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jan 05, 2006 11:37 am Post subject:
It's not clear what you want to do and the positions you mention don't seem to match your data. Please show a good example of your input records and what you want for output. And please show what's in CTL1CNTL.
Quote:
The issue is how to give the VLSHRT condition and create a trailer records and all for the select clause.
I don't understand the "issue". You can use:
Code:
OPTION VLSHRT
in CTL1CNTL with SELECT. You can also use VLSCMP for INCLUDE/OMIT.
Quote:
I read that the select needs lot of memory to execute.
SELECT only needs a lot of memory in specific cases and yours is not one of them - here's the relevent text from the DFSORT book:
Quote:
ICETOOL requires extra storage for SELECT processing, over and above what is normally needed by ICETOOL and DFSORT, in order to save your records until it can determine whether or not they meet your specified criteria. In most cases, only a small amount of storage is needed and can be obtained (above 16MB virtual). However, for a FROM data set with a large record length and criteria requiring many saved records, a large amount of storage is needed. For example, with a record length of 32756 and HIGHER(99), over 3 MBs of storage is needed.
FIRST does not require a lot of storage. _________________ 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