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
 

 

Sort Numeric

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
senthamizh

New User


Joined: 27 Apr 2009
Posts: 22
Location: mumbai

PostPosted: Tue Apr 21, 2015 8:55 am    Post subject: Sort Numeric
Reply with quote

Hi,

I have to omit the nonnumeric records from the input file. Below is the sample input and sort cond i am using.

1/p:
Code:
----+----1----+----2-
*********************
AB  00000-350000     
XX  000004363500     
34  000001010000     
VS  00000-128800     
DS  00000-29167     
12  000005679899


Code:
sort cond = OMIT=(05,16,ZD,NE,NUM) 


the cobol layout for the fields is defines as PIC 9(12)V9999.This filed is Zoned Decimel.

When i use this omit cond i am able to omit non numeric records.But now i want to omit only the records with +ve sign from the input records.I dont want to omit the -ve signed nonnumeric records form the input file.

the out put should be,
Code:
----+----1----+----2-
*********************
AB  00000-350000     
VS  00000-128800     
DS  00000-29167 


could some one help me on this.what will be SORT COND i can use.


Thanks,
chez

Code'd
Back to top
View user's profile Send private message

RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Tue Apr 21, 2015 10:22 am    Post subject: Reply to: Sort Numeric
Reply with quote

I wonder if you can call them +ve and -ve signs?

I would call it as a dash/hyphen '-' present in the data and would compare it with that. If the position is fixed then it's better but if not then you have to write multiple compare statements for each column from column 5 to 16.

something like: INCLUDE=(5,16,FS,NE,NUM),AND,(5,1,CH,EQ,C'-') and so on for other columns from 6-16
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Tue Apr 21, 2015 2:29 pm    Post subject:
Reply with quote

First of all, you have to be consistent with your example:
* You say the "numeric" field is 16 chars long, yet your example has only 12 chars.
* This is not a valid sort command. Why not just give the original statement ?
Quote:
Code:
sort cond = OMIT=(05,16,ZD,NE,NUM)

* I haven't seen any records with a "+ve" sign in your example.

This being said, have you tried:
Code:
 INCLUDE COND=(05,16,SS,EQ,C'-')
Back to top
View user's profile Send private message
senthamizh

New User


Joined: 27 Apr 2009
Posts: 22
Location: mumbai

PostPosted: Tue Apr 21, 2015 5:06 pm    Post subject: Reply to: Sort Numeric
Reply with quote

Thanks all. I try INCLUDE COND=(05,16,SS,EQ,C'-').I tested with sample records it worked. Will try in the job and test it.Thank you very much.

Thanks,
Chez
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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