man uakebcpd





NAME


  uakebcpd - ebcdic and	packed decimal conversion


SYNOPSIS


  uakebcpd [-options] input-file


DESCRIPTION


  The uakebcpd utility will convert an ebcdic file with	imbedded packed
  decimal fields to ascii.  The	packed decimal fields must be explicitely
  identified.  Please reference	notes at bottom, this utility is largely
  untested.


OPTIONS


  -length record-length
       It is presumed the input	file is	fixed length records (typical for
       IBM) which was probably provided	to UNIX	via dd.

  -packed column.length[,...]
       Specify the packed decimal field(s).

  -output filename
       To specify output file, defaults	to stdout.

  -verbose
       Verbose option to display settings.

  -?   Display terse help message.


EXAMPLES


   snkac@java: uakebcpd	-v -l 6	-p3.2 uakebcpd.test
   ebcdic: Cols	0001-0002 Lng:	 2
   packed: Cols	0003-0004 Lng:	 2
   ebcdic: Cols	0005-0006 Lng:	 2
   ab0001cd
   AB1234CD
   Invalid: field 1 record 3
   121?0034
   Ab9876cD

   4 records, 1	errors
   snkac@java:


NOTES


  This utility was written quickly for a former	employer (UofA SOIS) who did
  not realize in their MVS to UNIX conversion that some	of their archival
  data contained packed	decimal	fields (written	by COBOL).  This utility was
  tested only with small test file.

  The byte order of packed decimal may need to be reversed (big-endian vs.
  little-endian); if necessary the flip.c routine may accomodate this.

  The ebcdic to	ascii conversion table should be re-validated (it was
  extracted from a VMS library routine).  Code un-packing may not deal with
  negative fields, if it is wrong at least error count should be incremented
  and exit(2).

  If this utility works, great.	 If it does not	work properly, corrections
  sent to dutools@ts.sois.alaska.edu will be re-incorporated.


RELATED INFORMATION


   uakebcpd.c  convert ebcdic|packed ->	ascii (source)
   uakebcpd    convert ebcdic|packed ->	ascii (executable)

   uakebcpd_test.c  write small	test file to convert
   uakebcpd.test    small test file

   cci/*       general routines
   cci/ptox.c  courtesy	of of orca:uacn_util:[ibm.cci]ptox.c
   cci/etoa.c  rewritten from vms (orca) which used LIB$AB_EBC_ASC
   cci/etoa.h  constructed under vms (orca) using vms/ebc.c