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

Question in DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
passion_sujesh

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Thu Oct 24, 2013 8:40 pm
Reply with quote

Hi,

I am trying to extract few records (based on condition) from a file using sort step. The field is packed decimal type (newly added field). This field also has value spaces in this field for the existing records. (X'4040404040' is displayed in the field when i view in fileaid).

When I use sort, the o/p also includes records with spaces.

Field name - Field-1; Field type - Packed decimal, Field length - 5. Required condition is Field-1 is greater than zero.

When i try the following condition, the o/p also includes the records with value spaces in this field.

SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(100,5,PD,GT,0)


I am able to skip the records with spaces using the below condition, but I am not sure if this is the best approach. Is there any other way I can skip the records with spaces in this field.

SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(100,5,CH,NE,X'4040404040',AND,100,5,PD,GT,0)

Thanks in Advance for you suggestions.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 24, 2013 9:04 pm
Reply with quote

Hello,

If the data will be that inconsistent, that code should do what you want.

Why is the data inconsistent? Do those data positions have different usage for different record types?
Back to top
View user's profile Send private message
passion_sujesh

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Thu Oct 24, 2013 9:10 pm
Reply with quote

This is a new field. I am replacing a FILLER with this new field. Just now i realised that this field (Used to be filler) also has spaces for existing records.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 24, 2013 11:39 pm
Reply with quote

Hello,

Then you need to initialize the field as part of making it "named" instead of filler.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Question for file manager IBM Tools 7
Search our Forums:

Back to Top