View previous topic :: View next topic
|
Author |
Message |
Absinthia
New User
Joined: 10 Jan 2008 Posts: 36 Location: CHINA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is "fix(5)" packed-decimal, binary, or something else? I don't speak pl/i (yet)
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Frank,
Thanx for the correction - my fingers got ahead of me and i didn't catch it when i re-read the reply
Also, i probably should have used 2 examples. . .
d |
|
Back to top |
|
|
|