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 

icetool select clause on VB file

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


Joined: 02 Nov 2004
Posts: 57
Topics: 20

PostPosted: Thu Jan 05, 2006 10:00 am    Post subject: icetool select clause on VB file Reply with quote

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.

Can anyone help me in this.

eg:-
HH20060101
DD111111111111111AB
DD111111111111111AB
DD222222222222222CD22
DD333333333333333EF333333
DD333333333333333EF333333
TT00005

I need to get the output file as below


HH20060101
DD111111111111111AB
DD222222222222222CD22
DD333333333333333EF333333
TT00003

and saverest file as below

DD111111111111111AB
DD333333333333333EF333333

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??
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: Thu Jan 05, 2006 10:14 am    Post subject: Reply with quote

infoman123,

Do you need to retain the orginal Header? or can it be created dynamically ? i.e HH in the first 2 bytes followed by current date

When you say the key is at pos 29 did you account for the 4 bytes of RDW?

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


Joined: 02 Nov 2004
Posts: 57
Topics: 20

PostPosted: Thu Jan 05, 2006 11:28 am    Post subject: Reply with quote

Kolusu,

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.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Jan 05, 2006 11:37 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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