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

Omit condition for Pack decimal field in sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Fri Jan 29, 2010 2:22 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Jan 29, 2010 2:50 pm
Reply with quote

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
View user's profile Send private message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Fri Jan 29, 2010 2:59 pm
Reply with quote

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 icon_cry.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 3:00 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 29, 2010 3:05 pm
Reply with quote

Hi,

can you show the input data with HEX ON.



Gerry
Back to top
View user's profile Send private message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Fri Jan 29, 2010 3:09 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 29, 2010 3:16 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 29, 2010 3:30 pm
Reply with quote

Hi,

I agree with Enrico. 'V' in PIC clause implies the inclusion of a decimal point.



Gerry
Back to top
View user's profile Send private message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Fri Jan 29, 2010 3:55 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top