Page 1 of 1

to convert a field of s9(9) to alphanumeric

PostPosted: Fri May 21, 2010 6:45 pm
by Shireesha09
Hi,

I want to convert a field of s9(9) to alphanumeric and want to omit this field based on conditions.Can anyone help me in this..
The sort card i sused below.But still the field is not ommitted.

SORT FIELDS=(27,9,CH,A)
OMIT FIELD=(27,9,CH,EQ, C'666666666').

Re: to convert a field of s9(9) to alphanumeric

PostPosted: Fri May 21, 2010 10:39 pm
by Frank Yaeger
What do the values of the S9(9) field look like in hex? Do they have C signs, F signs or D signs?

What do you want the converted values to look like exactly (alphanumeric can mean a lot of things)?

You can handle the S9(9) values directly regardless of their signs by using ZD format, e.g.

    OMIT COND=(27,9,ZD,EQ,666666666)
    SORT FIELDS=(27,9,ZD,A)


If the values have C signs and you want them to be printable, you can use these DFSORT control statements to give the values F signs so they'll be printable:

    INREC OVERLAY=(27:27,9,ZD,TO=ZDF,LENGTH=9)
    OMIT COND=(27,9,CH,EQ,C'666666666')
    SORT FIELDS=(27,9,CH,A)


If the values have F signs, then you don't need to convert them as they are already alphanumeric so this will work:

    OMIT COND=(27,9,CH,EQ,C'666666666')
    SORT FIELDS=(27,9,CH,A)


If the values have D signs, those are negative, so you have to indicate what you want the output values to look like.