Page 1 of 1

Shifting data to the right

PostPosted: Fri Apr 29, 2022 4:47 am
by socker_dad
I found about 50 records in a huge file that need to have the data in the record shifted one character to the right. These are very long records, so manually scooting the data 1 byte to the right, 80 columns at a time isn't an acceptable solution.

However, my trusty File Aid manual has failed me. I've tried EDIT, MOVE, and REPL to no avail. The goal is to copy the entire file, updating the few records that meets the criteria. Here's the batch instructions I have tried:

$$DD01 CA IF=(05,EQ,C'2620200203926936'),
          EDIT=(194,1,X'40',X'4040')

$$DD01 CA IF=(05,EQ,C'2620200203926936'),
        MOVE=(194,X'40')

$$DD01 CA IF=(05,EQ,C'2620200203926936'),
        REPL=(194,EQ,X'40',X'4040')

(Don't ask where the "SELECT ALL" text came from - it isn't me!) The output file is written, but the records are not updated. I've also tried COPY instead of CA in each instance, but the output is disappointingly the same. I didn't see anything in the TSO application that would seem help either.

I'm very confused.

Any suggestions?

Re: Shifting data to the right

PostPosted: Fri Apr 29, 2022 1:29 pm
by willy jensen
When you say "manually scooting" does that mean that you have used ISPF EDIT to look at the data? If that is the case then you should be be able to use the > (shift right) line command.
Just a thought.

Re: Shifting data to the right

PostPosted: Fri Apr 29, 2022 1:41 pm
by willy jensen
Sorry, that should have been ) for shift right.

Re: Shifting data to the right

PostPosted: Wed May 04, 2022 12:59 am
by socker_dad
That didn't work - the ( command shifted the entire line - all 20,000 bytes of it, both before and after where I was positioned (at column 1,906) when I did it. Not at all like the line editor command of standard TSO edit.

So - any File Aid experts care to explain these File Aid commands? I suspect that you cannot qualify any selection criteria for the command: it's either all lines or nothing?

Any one?

Any one?