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

How to omit the record that meet some conditions?


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

New User


Joined: 10 Jan 2008
Posts: 36
Location: CHINA

PostPosted: Thu Apr 03, 2008 7:28 am
Reply with quote

I have a very large file, in the record, the field abc is declared as fix(5) in Pl/1 (from 357 to 359) and I want to omit the records that abc is 000 with sort. How to write the sort job?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 03, 2008 8:00 am
Reply with quote

Hello,

Is "fix(5)" packed-decimal, binary, or something else? I don't speak pl/i (yet) icon_smile.gif

Quote:
How to write the
000
control card?(when hex on is open)

You will want to use OMIT to discard the 000 records like:
Code:
OMIT COND=(357,3,xx,PD,EQ,000)
where xx is the data type (probably PD or BI).

If you want to ensure some sequence of the output, use SORT. If you want to simply create a new file minus the 000 records, use COPY.

An example of something quite similar to what you want is in this topic: http://ibmmainframes.com/viewtopic.php?t=27232

If this does not meet what you want to do, please post the details of your files (recfm,lrecl), a bit of sample input, and what you want for output from that input.
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: Thu Apr 03, 2008 9:22 pm
Reply with quote

Absinthia,

Given that you said the field is 3 bytes, I'm assuming it's DEC FIXED(5) which is equivalent to a 3-byte PD value. So you can use a DFSORT job like the following to do what you asked for.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(357,3,PD,EQ,+0)
/*



Dick,

You have xx,PD in your statement - you should either have xx or PD but not both.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 04, 2008 12:46 am
Reply with quote

Hi Frank,

Thanx for the correction - my fingers got ahead of me and i didn't catch it when i re-read the reply icon_redface.gif

Also, i probably should have used 2 examples. . .

d
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top