//SORTIN DD *
+0000000011
-0000000011
/*
+0000000011
-0000000011
/*
Using this data I need to just convert the number in the first record to binary and the number in the second record to the negatie binary value (ie The first character is driving the positive/negative conversion)
I'm using the following SORT statements
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,BUILD(1,1,2,10,ZD,TO=BI)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'-'),OVERLAY(2:2,4,ZD,TO=FS,LENGTH=4)
OUTREC IFTHEN=(WHEN=INIT,BUILD(1,1,2,10,ZD,TO=BI)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'-'),OVERLAY(2:2,4,ZD,TO=FS,LENGTH=4)
The job runs to CC=0.
However, when I look at the generated records, the first positive number is correct, however the second number has had the leading zeros replaced with spaces x'40'.
Record 1 - 4E000000 0B000000
Record 2 - 60404040 FB000000
Red indicates the spaces where I expected zeros.
I looked in the DFSORT OPTIONS to see if there was something to control this but couldn't see anything.
Any thoughts appreciated!