IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extracting records using Sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venkatraman

New User


Joined: 02 Jul 2006
Posts: 12

PostPosted: Sat Aug 25, 2007 10:57 am
Reply with quote

hi,
my requirements
i am having 60 error fields in the output file .in the output file the error field 1, 4 and 22 will be set .
i want to omit the error field 1,4,and 22.
i want to check is there is any error field is set other than the expected error field and if it is set then i need to extract that particular records .

please let me know how to proceed using Sort .


Thanks
venkat
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Sat Aug 25, 2007 11:18 am
Reply with quote

you can use sort with OMIT option.
Back to top
View user's profile Send private message
venkatraman

New User


Joined: 02 Jul 2006
Posts: 12

PostPosted: Sat Aug 25, 2007 3:52 pm
Reply with quote

thanks for your reply
for the first condition we can use omit condition i.e error field 1,2,and 22
For condition 2 i need to check the error field i.e other than error fields 1,2,and 22 and if it is is set then we need to extract that particular records.

So let me know the sort card for the condition.

Thanks
venkat
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Aug 25, 2007 3:58 pm
Reply with quote

Please post the format of the input and the output records with their field positions.
Back to top
View user's profile Send private message
venkatraman

New User


Joined: 02 Jul 2006
Posts: 12

PostPosted: Sat Aug 25, 2007 4:12 pm
Reply with quote

The file attributes of both input and output is same i.e RECFm is vb and the record length is 2004.

The error fields starts from the position 700 to 759

700 -- error field 1
-
-
-
-
-
759 -- error field 60
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Aug 25, 2007 4:17 pm
Reply with quote

What is the default value for no error being flagged ?
Back to top
View user's profile Send private message
venkatraman

New User


Joined: 02 Jul 2006
Posts: 12

PostPosted: Sat Aug 25, 2007 4:24 pm
Reply with quote

The default value is spaces
if it is set then the value is '1'
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Aug 25, 2007 4:32 pm
Reply with quote

Code:

 INCLUDE COND=(705,2,CH,NE,C' ',OR,
              next group of fields,OR,
              last group of fields)


Note that I have added 4 bytes for the VB RDW to the positions you have specified for the fields.
Back to top
View user's profile Send private message
venkatraman

New User


Joined: 02 Jul 2006
Posts: 12

PostPosted: Sat Aug 25, 2007 4:49 pm
Reply with quote

Thanks
i will check it and let you know
Could you please explain about the sort card that you have given in the prev reply ,because iam not aware of this option given in the include condition.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 4:54 pm
Reply with quote

venkatraman wrote:
Thanks
i will check it and let you know
Could you please explain about the sort card that you have given in the prev reply ,because iam not aware of this option given in the include condition.
What option are you refering to?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Aug 25, 2007 4:55 pm
Reply with quote

Here's a link to the relevant section of the manual. The manauls can be easily accessed from the "MANUALS" button on the top of most pages.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/ICE1CG10/2.2?SHELF=ICE1SH10&DT=20050223112358
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Aug 25, 2007 9:00 pm
Reply with quote

Quote:
my requirements
i am having 60 error fields in the output file .in the output file the error field 1, 4 and 22 will be set .
i want to omit the error field 1,4,and 22.
i want to check is there is any error field is set other than the expected error field and if it is set then i need to extract that particular records .


It's unclear what you want to do. Please give more details.

When you say you have "60 error fields in the output file", do you mean you have an input file that has 60 one-byte fields with error or non-values in it? If not, what do you mean?

Do the error fields start at position 704 (counting the RDW) or somewhere else (counting the RDW)?

When you say "the error field 1, 4 and 22 will be set", do you mean that each field can have an error value of 1, 4 or 22 or a non-error value? Can the non-error value be anything other than 1,4 or 22?

By 1, 4, and 22, do you mean X'01', X'04' and X'16' or something else? If something else, what exactly (in hex)?

Do you want to omit each record that has an error value somewhere in the 60 fields, and keep each record that doesn't have an error value somewhere in the 60 fields, or do you want something else?

It would help if you showed an example of your input records (relevant values only) and what you want for output.

Once you've explained exactly what you want, I'll be able to tell you how to do it with DFSORT.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top