Page 1 of 1

Append Text on HEX'00' with DFSORT

PostPosted: Mon Mar 05, 2018 9:40 pm
by ThomasThoss
Hi there,

i have the following Situation and need some help please.

Input File RECL 62.

                           >------TEXT-FIELD--------------<
0001000101BEUSERID000000EF1DTEXT10000000000000000000000000EFDE
0001000101BEUSERID000000EF1DSOMETEXT1000000000000000000000EFDE
 

Pos 1-28 Some Binary Decimal and Chars
Pos 29-59 TEXTFIELD CHAR 30 Bytes filled with HEX'00'
Pos 60-61 Binary Decimal

Now, i have a DFSORT that will make a Overlay on the Char Field at Position 29. So far, so good.
....
OVERLAY=(29:C'. TEST OK')
...
 


That will Result in

                           >------TEXT-FIELD--------------<
0001000101BEUSERID000000EF1DTEST OK00000000000000000000000EFDE
0001000101BEUSERID000000EF1DTEST OKT1000000000000000000000EFDE
 

To remove the Overlayed Text TEST OKT1 i am able to Change the Overlay to:
....
OVERLAY=(29:C'. TEST OK',X23'00')
...
 

With the Result

                           >------TEXT-FIELD--------------<
0001000101BEUSERID000000EF1DTEST OK00000000000000000000000EFDE
0001000101BEUSERID000000EF1DTEST OK00000000000000000000000EFDE
 


But what i need is to append my Text at the First Position of a Hex '00' in the Textfield between Position 29-59 so the Result should be:

                           >------TEXT-FIELD--------------<
0001000101BEUSERID000000EF1DTEXT1TEST OK000000000000000000EFDE
0001000101BEUSERID000000EF1DSOMETEXT1TEST OK00000000000000EFDE
 

How am i able to give the Overlay the instructions to append a Text on the Fist Position of a Hex'00' in a Textfield?

Best Regards Thomas

Re: Append Text on HEX'00' with DFSORT

PostPosted: Tue Mar 06, 2018 12:35 pm
by expat
Try here http://ibmmainframes.com/about45948.html

Amazing what google can find you ......

Re: Append Text on HEX'00' with DFSORT

PostPosted: Tue Mar 06, 2018 12:56 pm
by ThomasThoss
expat wrote:Try here http://ibmmainframes.com/about45948.html
Amazing what google can find you ......

Thx, i allready asked google.
But this is not what i am looking for.
I allready have all my include conditions, joinkey and reformat Statements. That is working absolute perfect.

JOINKEYS FILE=F1,FIELDS=(1,2,A...)
JOINKEYS FILE=F2,FIELDS=(1,2,A...)
  REFORMAT FIELDS=(F1:1,...F2:...)
  OPTION COPY
  INCLUDE COND=(1,2...)
  OUTREC IFTHEN=(WHEN=(3,2,ZD,EQ,2),
      OVERLAY=(1:X'0003',3:X'0000',5:X'0000'...
               29:C'. Append Text '...)
 

So here is my question again.

                          >------TEXT-FIELD--------------<
0001000101BEUSERID000000EF1DTEXT1TEST OK000000000000000000EFDE
0001000101BEUSERID000000EF1DSOMETEXT1TEST OK00000000000000EFDE

How am i able to give the Overlay the instructions to append a Text on the Fist Position of a Hex'00' in a Textfield?