Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Extracting records using Sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Extracting records using Sort
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    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Aug 25, 2007 3:58 pm    Post subject: Reply to: Extracting records using Sort
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 25, 2007 4:17 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 25, 2007 4:32 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sat Aug 25, 2007 4:54 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 25, 2007 4:55 pm    Post subject:
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 Moderator


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

PostPosted: Sat Aug 25, 2007 9:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us