@Rum wrote: i specified this as in input as @1 rec_id PD6 and at output as Z10. Both source and dat file conversion doing on mainframe not out of it that
So you seem to be saying you have program something like this:
data want;
infile myfile ;
input @1 rec_id pd6.;
format rec_id Z10.;
run;
So take a look at what is actually in the 6 bytes at the start of the record. You could use the LIST statement to have SAS dump the data to the log. You could read the value into a character string and print it with the $HEX format to see what it has. So perhaps something like this:
data want;
infile myfile ;
input @1 rec_id_hex $char6. @1 rec_id pd6.;
format rec_id Z10. rec_id_hex $hex.;
run;
Once you have some of the example values share them with us and we can help you check if they really are in PD format or not.
For example here is little program you try running to see what PD values should look like:
data test;
do integer=1 to 4000 by 500;
pd = put(integer,pd6.);
s370fpd = put(integer,s370fpd6.);
output;
end;
format pd s370fpd $hex.;
run;
Results when run on Windows.
Obs integer pd s370fpd
1 1 000000000001 00000000001C
2 501 000000000501 00000000501C
3 1001 000000001001 00000001001C
4 1501 000000001501 00000001501C
5 2001 000000002001 00000002001C
6 2501 000000002501 00000002501C
7 3001 000000003001 00000003001C
8 3501 000000003501 00000003501C
Notice how the S370FPD format has that hex digit C in the last nibble of the last byte while the PD format on Windows does not.
... View more