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
 

 

Omit condition for Pack decimal field in sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Omit condition for Pack decimal field in sort
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: 1187
Location: Bangalore,India

PostPosted: Fri Jan 29, 2010 2:50 pm    Post subject:
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    Post subject: Reply to: Omit condition for Pack decimal field in sort
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: 2429
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 3:00 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Jan 29, 2010 3:05 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Fri Jan 29, 2010 3:16 pm    Post subject: Reply to: Omit condition for Pack decimal field in sort
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: 1703
Location: Australia

PostPosted: Fri Jan 29, 2010 3:30 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm


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