Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hexadecimal MOVE

Status
Not open for further replies.

Mausolo

Programmer
Jul 2, 2002
16
ES
I have the next case

01 VAR-X PIC X.

MOVE X'05' TO VAR-X

With this sentence i do a hexadecimal MOVE to variable VAR-X

I need to do this, but no constant value, i need something like this:

MOVE X'VAR-Y TO VAR-X

where VAR-Y not is: 01 VAR-Y PIC X VALUE X'05
VAR-Y is: 01 VAR-Y PIC X.
VAR-Y is a input field with hexadecimal values.
Thanks.

 
It is simply:
Code:
MOVE VAR-Y TO VAR-X.
Tom Morrison
 
I don't explain very well

I have
01 PIC X.
As a input field with value: F9 in hex or '9'
Then the value of x (ie 9) represents a hex value, than is 9 in decimal too.
If i do MOVE X TO FIELD-COMP-1
I get the value 9 in FIELD-COMP-1...ok
But if X = 'A' in hex is C1,
How i do a move that transform 'A' en A hex (value 10 decimal).

So in my input field (is x(big)) i have something like this:

FFFFFC i.e.
413001 i.e. '41300A'

I want, in other pic x(big) this:
000000
41301A , without character F





 
Hi Mausolo,

Try this:

Show us a table with the send and receive fields, e.g.

Code:
       SEND      RECV
       PIC S9(2) PIC S9(2) COMP
       X'F1F2'   X'0012'
       X'F1C2    X'0012'
       X'F1D2'   X'FF12'
or
       PIC S9(2) PIC S9(2) COMP-3 
       X'F1F2'   X'012F'
       X'F1C2'   X'012C'
       X'F1D2'   X'012D'
or
       PIC S9(2) PIC  9(2) 
       X'F1F2'   X'FIF2'
       X'F1C2'   X'F1F2'
       X'F1D2'   X'F1F2'

I'v included the PICs of the send/recv fields to give you an idea of what happens when you change the data descriptions in your pgm. You don't have to do that when you send yor reply. Just show us what you send and what you'd like to see at the other end.

You may not be able to get what you want, but let's give it a try.

Regards, Jack.
 
Hi Mausolo,

Try this:

Show us a table with the send and receive fields, e.g.
Code:
       SEND      RECV
       PIC S9(2) PIC S9(2) COMP
       X'F1F2'   X'0012'
       X'F1C2    X'0012'
       X'F1D2'   X'FF12'
or
       PIC S9(2) PIC S9(2) COMP-3 
       X'F1F2'   X'012F'
       X'F1C2'   X'012C'
       X'F1D2'   X'012D'
or
       PIC S9(2) PIC 9(2) 
       X'F1F2'   X'FIF2'
       X'F1C2'   X'F1F2'
       X'F1D2'   X'F1F2'
I've included the PICs of the send/recv fields to give you an idea of what happens when you change the data descriptions in your pgm. You don't have to do that when you send yor reply. Just show us what you send and what you'd like to see at the other end.

You may not be able to get what you want, but let's give it a try.

Regards, Jack.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top