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
 

 

How to omit the record that meet some conditions?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to omit the record that meet some conditions?
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

Site Director


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

PostPosted: Thu Apr 03, 2008 8:00 am    Post subject:
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 Moderator


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

PostPosted: Thu Apr 03, 2008 9:22 pm    Post subject:
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

Site Director


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

PostPosted: Fri Apr 04, 2008 12:46 am    Post subject: Reply to: How to omit the record that meet some conditions?
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    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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am


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