Joined: 06 Jun 2008 Posts: 8201 Location: Dubuque, Iowa, USA
This is a help forum, not a DO-YOUR-JOB-FOR-YOU forum. Most of the people who monitor this forum are paid for their professional work product (such as assembler code). Unless you're willing to pay the appropriate amount for professional assistance (rates of USD 1000 per day are fairly typical), please do not ask for code. If you code it up on your own and have trouble, there's plenty of people willing to help you fix it. But unless you show some initiative by coding on your own, you're probably not going to see much support here.
You are expected to be able to research things, read manuals, and figure out things on your own.
A warning is in order here - MANY have erred in thinking that all values between 'A' and 'Z' ( inclusive ) are alphabetic. In fact, they are NOT. In EBCDIC, the letter 'A' is hex 'C1' (x'C1') and the letter 'Z' is hex 'E9' (x'E9'). But between x'C1' and x'E9' there are values ( i.e. x'CA', x'CB', x'CC', x'CD', x'CE', x'CF', x'D0', x'DA', x'DB', x'DC', x'DE', x'DF', x'E0', and x'E1' ) which are NOT alphabetic. Do NOT neglect to account for these if you test individual bytes to determine if they are "alphabetic".
It is never a good idea to test a ONE-BYTE field to see if it is NUMERIC or ALPHABETIC.
Why? Well, because if the value is x'C1' it will qualify as BOTH. That is, the value x'C1' is both a valid (signed) number ( value +1 ) AND a valid alphabetic character ( letter 'A' ).
To test a 1-byte field, either test the actual hex representation in accordance with your requirements, or move it to the last byte of a larger field that has been pre-filled with valid values (according to your requirements), and then test that larger field.