Fixed-length decimal data

Sample C usage PL/I subroutine
#pragma linkage (pdec, PLI)
#include <stdio.h>
#include <decimal.h>
decimal(5,2) gpd;
main()   {
  decimal(5,2) pd1;
  printf("Packed decimal text\n");
  pd1 = 52d;
  pdec(pd1);
  if (gpd ! = 57d)
{
    printf("Fixed decimal error\n");
    printf("Expect: 57\n");
    printf("Result: %D(5,2)\n",gpd);
}
  printf("Value: %D(5,2)\n:, gpd);
  printf("Finished test\n");
}
 
PDEC: PROC (X);
    DCL X FIXED DEC(5,2);
    DCL GPD FIXED DEC(5,2) EXTERNAL;
    X = X+5;
    GPD = X;
    END;