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

find those records having both -ve & +value in binary fi


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

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Sun May 11, 2008 10:06 pm
Reply with quote

Hi,

I have a file containing a large no of records each with 600bytes length. I am concerned with first 8 bytes only which contain S9(15) COMP data.

I want to find only those records which have negative value as well as +value for a particular no in this field.

for eg:

i tried:
//sysin dd *
include cond=(1,8,bi,eq,-222229334,or,1,8,bi,eq,222229334)
sort fields=copy
/*

I got some format incompatible error message. How can i get my records?

I can not use OUTREC or INREC with EDIT feature because i do not want to increase the record length i the output file and since the no of records may be large also.


-Ajay
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun May 11, 2008 10:20 pm
Reply with quote

Posting the error would have helped......
Have you looked at the difference between FI & BI formats?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 12, 2008 5:23 am
Reply with quote

Ajay,

BI is unsigned binary, so comparing a BI field to a negative value is invalid ... that's the reason for the error message. FI is signed binary - that's what you want to use:

Code:

  INCLUDE COND=(1,8,FI,EQ,-222229334,OR,1,8,FI,EQ,222229334) 
  SORT FIELDS=COPY                                           
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Wed May 14, 2008 9:40 pm
Reply with quote

Thanks CICS guy and Frank. I tested it and i am getting it.


-Ajay
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top