Converting alphanumberic to COMP-3



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Converting alphanumberic to COMP-3

Postby rjambu » Tue Mar 01, 2011 10:31 pm

Input LRECL: 38

//SORTOUT DD DSN=A.B.C,
// UNIT=DISK,SPACE=(TRK,(1,2),RLSE),
// DCB=(LRECL=26,BLKSIZE=0,RECFM=FB),
// DISP=(NEW,CATLG,DELETE)
//SYSSORT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//SYSIN DD *
SORT FIELDS=COPY
INREC PARSE=(%00=(ENDBEFR=X'6A',FIXLEN=06),
%01=(ENDBEFR=X'6A',FIXLEN=03),
%02=(ENDBEFR=X'6A',FIXLEN=06),
%03=(ENDBEFR=X'6A',FIXLEN=05),
%04=(ENDBEFR=X'6A',FIXLEN=05),
%05=(ENDBEFR=X'6A',FIXLEN=01)),
BUILD=(%00,%01,%02,%03,%04,UFF,EDIT=(TTTTT),%05)
/*
//


Input:

----+----1----+----2----+----3----+----4----+----

201010¦100¦566123-0¦14.47¦0000012311¦A
201009¦102¦566123-0¦10.43¦0000012311¦D
201009¦101¦566123-0¦ 0.00¦0000012311¦E

O/p would be like:
----+----1----+----2----+----3----+----4----+----

20101010056612314.4712311A
20100910256612310.4312311D
201009101566123 0.0012311E

I need to convert the 4th Column data
from numeric to S9(5)V9999 COMP-3

Can anyone let me know how to conver numberic to comp-3 or Alphanueric value to COMP-3.

Thanks
JRS
rjambu
 
Posts: 27
Joined: Tue Feb 08, 2011 7:59 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Converting alphanumberic to COMP-3

Postby skolusu » Tue Mar 01, 2011 10:55 pm

I need to convert the 4th Column data from numeric to S9(5)V9999 COMP-3


Just change the build statement from
BUILD=(%00,%01,%02,%03,%04,UFF,EDIT=(TTTTT),%05)


to

BUILD=(%00,%01,%02,%03,%04,UFF,PD,LENGTH=5,%05)
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post