Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
the sort doesn't function again
DFSORT "didn't function" because you did something wrong. But you haven't given any information on what "didn't function" means.
Did you get an error message? I so, show the messages you received.
Did you get different output then you expected? If so, show an example of the output you got and the output you expected.
If you mean something else by "didn't function", you need to give more details of what you mean.
By the way, the reason you needed to use OUTREC instead of INREC is because INREC is processed before SORT whereas OUTREC is processed after SORT. So with INREC, you changed the positions before you sorted and would need to use those reformatted positions for the SORT statement, whereas with OUTREC you changed the positions after SORT so you can use the input positions for the SORT statement.
Joined: 23 May 2008 Posts: 35 Location: beijing China
yeah,after I change to use the input positions for the SORT statement,it can work normally.
I am new to SORT,so there are to many concept is ambiguous to me.thanks everybody here give me those valuable information to solve my difficulty!
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
is the binary representation of the negative number.
Second, the format 'BI' is unsigned binary, for proper negative usage, you should use 'FI'.
Hi,
I am facing same sign issue but my Data type is PD(Packed decimal). I am getting all the values as positive even negative values are also changed to Positive. Could any of you please help!
A maintainable in the future solution MUST be like this
Code:
. . . . . .
//SYMNAMES DD *
COL_1,*,33,CH PIC X(33).
COL_2,*,4,FI S9(9) COMP.
COL_3,*,16,CH PIC X(16).
COL_4,*,17,ZD PIC S9(14)V999 COMP.
COL_5,*,70,CH PIC X(70).
//. . . . . .
//SYSIN DD *
SORT FIELDS=COPY SORT is done BEFORE OUTREC!!!
OUTREC BUILD=(COL_1, BUILD= is replacing obsolete FIELDS=
COL_2,EDIT=(STTTTTT),SIGNS=(+,-),
* '+' sign is mandatory in your example
* zero suppression not needed in your example
COL_3,
COL_4,EDIT=(STTTTTTTTTTTTTT.TTT),SIGNS=(+,-),
* '+' sign is mandatory in your example
* zero suppression not needed in your example
COL_5)
// . . . . .
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
Do we really need so much on a topic that was started 13 1/2 years ago? The post reviving the topic should have been a new topic, not a continuation of the original.