View previous topic :: View next topic
|
Author |
Message |
Khwairakpam Raju Singh
New User
Joined: 05 Dec 2007 Posts: 29 Location: Bangalore
|
|
|
|
Hi ,
Can anyone hepl me out to solve following issue in sort.
As a sort parm, I am using a omit condition to exclude all the record which have amount value not equal to -1150.00 as given below:
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(524,08,PD,NE,-1500)
OUTFIL FNAMES=SORTOUT
END
/*
|
In the copybook the field is define as :
Code: |
10 VJIN0001-A-WRTN-PREM PIC S9(13)V9(2) COMP-3.
|
The screen shot of the fieild having tha amount value is :
Code: |
VJIN0001
A WRTN PREM
PS 13.2
524--------------
0011 25000.39
0012 -1150.00
0013 -1150.00
0014 -28100.00
|
Here the problem is by using the omit condition :
OMIT COND=(524,08,PD,NE,-1150)
All the records are omited even thoughm the amount value is equal to
-1150.
Is there any error for the omit condition for Pack decimal format?
It will be very kind of you if you halp me out for this.
thanks in advance.
From ,
Raju Kh |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello Raju,
You have specified -1500 instead of -1150 in the sort condition
Code: |
/SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(524,08,PD,NE,-1500)
OUTFIL FNAMES=SORTOUT
END
/* |
|
|
Back to top |
|
|
Khwairakpam Raju Singh
New User
Joined: 05 Dec 2007 Posts: 29 Location: Bangalore
|
|
|
|
Oh !. That was a typo error.
Actually I have tested with following amount values but still it give the same issue:
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(524,08,PD,NE,-1150)
OUTFIL FNAMES=SORTOUT
END
/*
|
I have tested with 1150-, -1150.00 , 1150.00- etc.. but it dind't work |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
guptae wrote: |
Hello Raju,
You have specified -1500 instead of -1150 in the sort condition
|
This is so nice. Dont see an emoticon for bowing, but thats what im doing right now. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
can you show the input data with HEX ON.
Gerry |
|
Back to top |
|
|
Khwairakpam Raju Singh
New User
Joined: 05 Dec 2007 Posts: 29 Location: Bangalore
|
|
|
|
This is how it shows in HEX ON
Code: |
VJIN0001
A WRTN PREM
PS 13.2
524--------------
25000.39
00002009
0000503C
------------------
-1150.00
00000100
0000150D
------------------
-1150.00
00000100
0000150D
------------------
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
first glance suggestion/explanation
IIRC sort is unaware of the COBOLESE picture definition for the virtual decimal dot!
from a PACKED point of view the value You should specified is -115000
but look at the manuals anyway |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I agree with Enrico. 'V' in PIC clause implies the inclusion of a decimal point.
Gerry |
|
Back to top |
|
|
Khwairakpam Raju Singh
New User
Joined: 05 Dec 2007 Posts: 29 Location: Bangalore
|
|
|
|
Wow! its working now with
Code: |
OMIT COND=(524,08,PD,NE,-115000)
|
its a very good learning for me. Now the problesm is solve.
Thanks to all, espicaiily specially Enrico for your hepl.
Thanks.[/code] |
|
Back to top |
|
|
|