I do understand the use of Binary in an include statement



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

I do understand the use of Binary in an include statement

Postby deucalion0 » Wed Jan 06, 2016 4:23 pm

Hello all, happy new year!!

I am testing some control statements for Syncsort to learn the software.

I cannot for the life of me get my head around this simple piece of code:

//STEP1  EXEC  PGM=SORT   
//SYSOUT   DD  SYSOUT=*   
//SORTOUT  DD  SYSOUT=*   
//SORTIN   DD  *           
00000010                   
TEST1                     
TEST2                     
TEST3                     
//SYSIN    DD  *           
  SORT FIELDS=(1,6,CH,A)   
 INCLUDE COND=(1,1,BI,EQ,2)
//                         


When I run this it does not include the first line which I would expect it to.

What would I need to enter here in order for it to pick up on binary equaling 2?

I would have thought that 1,1 means starting in column one for a length of 1 would be one byte.

I would appreciate absolutely any advise on this.

Thank you so very much!!
deucalion0
 
Posts: 58
Joined: Thu Jul 31, 2014 3:47 pm
Has thanked: 32 times
Been thanked: 0 time

Re: I do understand the use of Binary in an include statemen

Postby BillyBoyo » Wed Jan 06, 2016 4:30 pm

The INCLUDE is only going to select anything if the first byte of one or more records contains the hexadecimal value 02 (X'02').
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: I do understand the use of Binary in an include statemen

Postby deucalion0 » Wed Jan 06, 2016 4:36 pm

Thank you for your reply Billy.

I experimented and the EBCDIC letters STX is HEX 02, so when I change the include to 1,3 I thought it would have picked this up, but it didn't.

STX                       
TEST1                     
TEST2                     
TEST3                     
//SYSIN    DD  *           
  SORT FIELDS=(1,6,CH,A)   
 INCLUDE COND=(1,3,BI,EQ,2)


You can probably see my thinking is not correct here.

Thank you!!
deucalion0
 
Posts: 58
Joined: Thu Jul 31, 2014 3:47 pm
Has thanked: 32 times
Been thanked: 0 time

Re: I do understand the use of Binary in an include statemen

Postby BillyBoyo » Wed Jan 06, 2016 4:58 pm

X'02' is not equivalent to the three letters STX. In certain specific contexts X'02' would mean STX (start of character) but I doubt you'll ever need to know that (I don't know what those contexts are).

Put your editor into HEX mode, put 02 into the hex area made available (in position one) and run your code.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: I do understand the use of Binary in an include statemen

Postby deucalion0 » Wed Jan 06, 2016 6:09 pm

Hi Billy,

that is excellent, I did that and then it worked.

Thank you for the help, it is appreciated!!
deucalion0
 
Posts: 58
Joined: Thu Jul 31, 2014 3:47 pm
Has thanked: 32 times
Been thanked: 0 time

Re: I do understand the use of Binary in an include statemen

Postby steve-myers » Sat Jan 16, 2016 8:47 am

STX is the code for 'Start of text," usually in the context of a data transmission using the now obsolete binary synchronous protocol. What we see here appears to be the character string STX, not X'02'.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post