Natural Unix - (assembler - instruction PACK)


Currently we have a routine that is running on Mainframe and it is written in assembler. Now, we need to use this same routine on Unix.

Due to the environment, we are writing in Natural. At this moment we have a doubt about some instructions that are used in assembler and we don’t know how we can do in Natural. Let me try to explain it.

According to the instruction PACK in assembler, we have: the variable is set to: H’080E0B0D’ after the instruction, the variable is set to: H’8EBD0000’.

Does anyone know how I can do it using Natural? As far as I know there is no instruction in Natural in order to replace the same instruction. I need to build a routine to handle it.

Does anyone know what the best way to do it is?

Thank you.

Kind regards,

Is there a generic pattern for things you need to “pack”, or is this a single, special case only ?

Hi Wolfgang,

it is generic, because it is possible other values in this variable. I wonder if you or someone have any routine or some statements already done in Natural in order to replace PACK statement.


The result you posted is NOT what a plain PACK statement would provide !

But if you can specify your requirements in detail I’ll write up a “pack” routine for you. E.g. what parameters are you passing to the assembler program etc. (Or just send the assmbler program to me)