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
 

 

Binary field in INCLUDE COND

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

New User


Joined: 21 Apr 2009
Posts: 5
Location: india

PostPosted: Sat Aug 14, 2010 4:38 pm    Post subject: Binary field in INCLUDE COND
Reply with quote

Hi,

I need to copy a file to another file and needs to include a condition to omit some values. The value which i need to omit is a Binary field.
In my sort i have given it as
SORT FIELDS=COPY
INCLUDE COND=(61,2,BI,NE,17)
But this sort is not omitting the values from the file at position 61 which is having value 17.
I am getting all the values copied to output file...
Please correct my sort so that it will eliminate the binary values with 17 from the file
Could some one pls help me with this ....
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 14, 2010 5:09 pm    Post subject:
Reply with quote

FB or VB would be my first question.
Back to top
View user's profile Send private message
krishnapriyavr

New User


Joined: 21 Apr 2009
Posts: 5
Location: india

PostPosted: Sat Aug 14, 2010 5:22 pm    Post subject:
Reply with quote

Its FB only
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sat Aug 14, 2010 5:31 pm    Post subject:
Reply with quote

Hello,

What is the COBOL picture of this field?

2 digits does not equal a length of 2 in the sort control statement. . .
Back to top
View user's profile Send private message
krishnapriyavr

New User


Joined: 21 Apr 2009
Posts: 5
Location: india

PostPosted: Sat Aug 14, 2010 5:40 pm    Post subject:
Reply with quote

Its S9(4) COMP Field in COBOL
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Sat Aug 14, 2010 8:01 pm    Post subject:
Reply with quote

Priya,
I ran a test job with 2 byte binary field having value of 17 and omitted the record correctly.

Just wondering if your intention is to OMIT records why are you using INCLUDE with NOT EQUAL condition? Why couldn't you use OMIT?
Do you have any other INCLUDE condition along with the one mentioned above?

If it is possible, please send us a screenshot of the input file as position 61 with hex on. Also please send us entire SYSOUT if possible.

Thanks,
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sat Aug 14, 2010 11:40 pm    Post subject:
Reply with quote

Hello,

Quote:
please send us a screenshot of the input file as position 61 with hex on
Please do not post "screenshots" as they introduce clutter and waste space.

Please use copy/paste from the terminal and the "Code" tag which will preserve alignment and have the appearance of a "green screen".
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Sun Aug 15, 2010 12:03 am    Post subject:
Reply with quote

dick scherrer,
I should have been more careful for the choice of my words. By screenshot I mean to ask OP for the input data but I should have just asked for input data in code tags.

Thanks,
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sun Aug 15, 2010 1:23 am    Post subject: Reply to: Binary field in INCLUDE COND
Reply with quote

Yup, i understood what you meant, but new people might not . . .

Thanks for the followup icon_smile.gif

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

DFSORT Moderator


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

PostPosted: Mon Aug 16, 2010 10:37 pm    Post subject:
Reply with quote

Priya,

If it didn't work, then you're misinterpreting things.

A 2-byte BI value of 17 is X'0011'. Is that what you're looking for? Perhaps you think you are testing for C'17'? To do that, you would use CH, not BI.

Consider this DFSORT job:

Code:

//S1 EXEC PGM=SORT                                                   
//SYSOUT DD SYSOUT=*                                                 
//SORTIN DD *                                                       
61-62 HAS X'0000'=0                                                 
61-62 HAS X'0011'=17                                                 
61-62 HAS X'0010'=16                                                 
61-62 HAS X'F1F7'=C'17'                                     17       
//OUT1 DD SYSOUT=*                                                   
//OUT2 DD SYSOUT=*                                                   
//SYSIN DD *                                                         
  SORT FIELDS=COPY                                                   
  OUTFIL FNAMES=OUT1,INCLUDE=(61,2,BI,NE,17)                         
  OUTFIL FNAMES=OUT2,INCLUDE=(61,2,BI,NE,C'17')                     


OUT1 has:

Code:

61-62 HAS X'0000'=0                                             
61-62 HAS X'0010'=16                                             
61-62 HAS X'F1F7'=C'17'                                     17   


OUT2 has:

Code:

61-62 HAS X'0000'=0       
61-62 HAS X'0011'=17       
61-62 HAS X'0010'=16       


If you still can't figure it out, then you can use:

Code:

   OPTION COPY
   INREC BUILD=(61,2,HEX)


to see the actual values in 61-62 in hex.
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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
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 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 outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm


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