SFF to binary



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

SFF to binary

Postby dja2 » Wed Oct 03, 2012 8:46 pm

I am trying to convert a delimited input file to a fixed-length field output record.

My JCL is;

//STEP030  EXEC PGM=SORT,COND=(0,NE)                     
//SORTIN   DD DSN=RMSDATA.PGUO.NSTXNS.PGQI.RMPMIBUS.TEMP,DISP=SHR                 
//SORTOUT  DD DSN=RMSDATA.PGUO.NSTXNS.PGQI.RMPMIBUS.S0000,
//            DISP=(NEW,CATLG,DELETE),                   
//            DCB=(LRECL=432,RECFM=FB),                   
//            DSORG=PS,                                   
//            SPACE=(CYL,(100,50),RLSE)                   
//SORTMSG  DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//SYMNAMES DD *                                           
UNIT,%00                                                 
TEAM,%01                                                 
RM,%02                                                   
CONNAME,%03                                               
APPURP,%04                                               
APPID,%05                                                 
BUSNTS,%06                                               
AGECOM,%07                                               
NUMDIR,%08                                       
//SYSIN    DD *                                   
  SORT FIELDS=COPY                               
  INREC PARSE=(UNIT=(ENDBEFR=C'|',FIXLEN=60),     
               TEAM=(ENDBEFR=C'|',FIXLEN=60),     
               RM=(ENDBEFR=C'|',FIXLEN=90),       
               CONNAME=(ENDBEFR=C'|',FIXLEN=80), 
               APPURP=(ENDBEFR=C'|',FIXLEN=120), 
               APPID=(ENDBEFR=C'|',FIXLEN=4),     
               BUSNTS=(ENDBEFR=C'|',FIXLEN=10),   
               AGECOM=(ENDBEFR=C'|',FIXLEN=4),   
               NUMDIR=(ENDBEFR=C'|',FIXLEN=4)),   
        BUILD=(UNIT,TEAM,RM,CONNAME,APPURP,       
               APPID,UFF,BI,LENGTH=4,             
               BUSNTS,                           
               AGECOM,UFF,BI,LENGTH=4,           
               NUMDIR,SFF,TO=BI,LENGTH=4) 

The relevant portion of a sample input record is;
000007    ID|ADAMS MR P S T/A ADAMS & CO|Increase|931072110|26/04/2012|-9|-9           


The relevant portion of an output record is;
000007                                                            ;26/04/2012       
          444444444444444444444444444444444444444444444444440025FF6FF6FFFF00000000
          00000000000000000000000000000000000000000000000000004E261041201200090009

I can understand why the first x'00000009' is not signed, (I haved used UFF, not SFF), but I can't understand why the second x'00000009' is not whatever is binary for -9, or have I misunderstood the meaning of "SFF"?
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time

Re: SFF to binary

Postby BillyBoyo » Wed Oct 03, 2012 8:58 pm

Have a look at Appendix C of the DFSort Application Programming Guide. You'll find that BI is unsigned. FI is probably what you are looking for.

Nice to see the use of Symbols, by the way :-)

These users thanked the author BillyBoyo for the post:
dja2 (Thu Oct 04, 2012 12:29 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SFF to binary

Postby skolusu » Wed Oct 03, 2012 9:18 pm

dja2,

As bill mentioned BI is binary unsigned. If you need to retain the sign, then you need FI format. Check this link explains in detail about the various DFSORT formats.

http://publibz.boulder.ibm.com/cgi-bin/ ... e1ca60/C.1?
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

These users thanked the author skolusu for the post:
dja2 (Thu Oct 04, 2012 12:30 pm)
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: SFF to binary

Postby dja2 » Thu Oct 04, 2012 12:31 pm

Thanks to both of you, especially for the links to the documentation
dja2
 
Posts: 20
Joined: Wed Jul 11, 2012 6:11 pm
Has thanked: 13 times
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post