What doesn't like the MVC 0(1,R5),0(R9)?  What do you mean by this?

Maybe you could include the code snippet that you can't get working and 
possibly an example of one of the records with what you want it to do. It's not 
clear what results you are looking for.

Rather than moving the data to the 8 byte work field, you could calculate the 
length you want to move and then move it.
        LA  R3,5          Counter for EX
MOVE MVC WORKAREA(0),0(R9)                Move instruction for execute
        EX R3,MOVE                  Move 5 bytes

To speed up the search, you can use the TRT instruction to search for the first 
character and then do your compare

     LA  R3,20             Length to search
TRT     TRT 0(0,R9),TRT_TAB
     EX R3,TRT            Search for the character
     JZ   Notfound
     CLC =C'ABC',0(R1)  Did we find it?
     JNE MATCH

TRT_TAB DC   256AL1(0)
           ORG TRT_TAB+C'A'                We want to find an "A"
           DC   C'A'
           ORG ,


Obviously this is not complete (you need to check lengths and various other 
things but it will get you started.

Jon Perryman.


>________________________________
> From: Rich Long <xmann...@yahoo.com>
>
>Issue I am facing - reading fixed length records, then searching for a fixed 
>length character string.  Once I
>find that string, there is a need to check the next 8 bytes to see how much 
>data follows.  It could
>be 1-8 characters in length.  Finding the fixed piece is easy enough.  When 
>checking the variable
>part, I check for a blank.  If non-blank, I need to save that byte into an 8 
>character field for
>use later.  Having an issue saving off the one character at a time.  Trying to 
>use an index
>register to keep track of the 8 byte field, so I know where to put the next 
>byte, if necessary.
>It doesnt't like the move - MVC 0(1,R5),0(R9).  R5 is supposed to be tracking 
>the 8 byte field
>location, and R9 is the input record.  LA R5,WORKAREA was used to point at the 
>8 byte field.
>I will then need to do another move of this variable length field to an output 
>record.
>It's sort of along the same line, moving the variable length field (1-8 
>characters) in the
>middle of some other fields.  So will need to keep track of the locations.  
>Any pointers would
>be most appreciated.
>

Reply via email to