Page 1 of 1

Bit processing in outrec

PostPosted: Thu Feb 18, 2010 11:55 pm
by qwertypower
Is it possible to use Bit processing in outrec?

Basically, want to copy over a file and turn the 3rd bit on in position 23. I've been able to use 23.3 in sort, but can't seem to get past syntax issues when trying it with outrec.

Re: Bit processing in outrec

PostPosted: Fri Feb 19, 2010 1:00 am
by Alissa Margulies
Please provide me with a sample record with HEX turned on, along with your desired output, also with HEX on.

Re: Bit processing in outrec

PostPosted: Fri Feb 19, 2010 2:00 am
by qwertypower
Input file -

rec 1 - bit 23.3 on
rec 2 - bit 23.3 off
rec 3 - bit 23.3 off

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
FIELD FIELD FIELD     Ã¸      FIELD FIELD FIELD                         
CCCDC4CCCDC4CCCDC444447444444CCCDC4CCCDC4CCCDC44444444444444444444444444
695340695340695340000000000006953406953406953400000000000000000000000000
-----------------------------------------------------------------------
FIELD FIELD FIELD     &      FIELD FIELD FIELD                         
CCCDC4CCCDC4CCCDC444445444444CCCDC4CCCDC4CCCDC44444444444444444444444444
695340695340695340000000000006953406953406953400000000000000000000000000
-----------------------------------------------------------------------
FIELD FIELD FIELD            FIELD FIELD FIELD                         
CCCDC4CCCDC4CCCDC444441444444CCCDC4CCCDC4CCCDC44444444444444444444444444
695340695340695340000000000006953406953406953400000000000000000000000000
-----------------------------------------------------------------------
**************************** Bottom of Data ****************************




Output file - copy entire record, turn bit 23.3 on for all

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
FIELD FIELD FIELD     Ã¸      FIELD FIELD FIELD                         
CCCDC4CCCDC4CCCDC444447444444CCCDC4CCCDC4CCCDC44444444444444444444444444
695340695340695340000000000006953406953406953400000000000000000000000000
-----------------------------------------------------------------------
FIELD FIELD FIELD     Ã¸      FIELD FIELD FIELD                         
CCCDC4CCCDC4CCCDC444447444444CCCDC4CCCDC4CCCDC44444444444444444444444444
695340695340695340000000000006953406953406953400000000000000000000000000
-----------------------------------------------------------------------
FIELD FIELD FIELD            FIELD FIELD FIELD                         
CCCDC4CCCDC4CCCDC444443444444CCCDC4CCCDC4CCCDC44444444444444444444444444
695340695340695340000000000006953406953406953400000000000000000000000000
-----------------------------------------------------------------------
**************************** Bottom of Data ****************************

Re: Bit processing in outrec

PostPosted: Tue Feb 23, 2010 3:51 am
by Alissa Margulies
Here is a SyncSort for z/OS job that should produce your requested output:
//SORT  EXEC PGM=SORT   
//SORTIN  DD DSN=INPUT.FILE,DISP=SHR
//SORTOUT DD SYSOUT=*   
//SYSOUT  DD SYSOUT=* 
//SYSIN   DD *   
   INREC IFTHEN=(WHEN=(23,1,BI,EQ,B'..0.....'),
   OVERLAY=(23:23,1,BI,ADD,+32,BI,LENGTH=1)) 
   SORT FIELDS=COPY
/*     

Re: Bit processing in outrec

PostPosted: Wed Feb 24, 2010 9:13 pm
by qwertypower
Awesome....this is exactly what we needed. I tried it out and it works great. Thanks so much! :D

Re: Bit processing in outrec

PostPosted: Wed Feb 24, 2010 9:16 pm
by Alissa Margulies
You're welcome. Thanks for letting us know it worked for you.