Joined: 13 Dec 2002 Posts: 45 Topics: 3 Location: 3rd Block from the SUN
Posted: Thu Jan 20, 2005 1:20 pm Post subject: Transpose Negative Sign from Right to Left
A scenario where the amount fields (20 bytes, contains comma, 2 decimal places) have -ve sign on the right.
The commas need to be removed & the sign embedded to the left of the first digit (most significant digit), with the rest of the record written as is.
Joined: 13 Dec 2002 Posts: 45 Topics: 3 Location: 3rd Block from the SUN
Posted: Thu Jan 20, 2005 1:30 pm Post subject: Decimal Position & File Characteristics
The input & output files are FB, length 170
The Dollar Amounts start in col 81
The Decimal point is static in col 98
The negative sign appears (if at all) in col 101
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jan 20, 2005 1:59 pm Post subject:
With z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004), you can use the new SFF (signed free form) format and OVERLAY parameter to do this quite easily and efficiently, as in the following DFSORT job:
If you have DFSORT, but don't have the new PTF installed, ask your System Programmer to install it (it's free). _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
1) 81,19,ZD - Syncsort has a limit of 15 bytes for a ZD field. (The new DFSORT PTF raises this limit to 31 for DFSORT.)
2) Your field is of the form dd,ddd,ddd.dds - this cannot be processed as a ZD field because of the commas, decimal point and trailing sign. (The new DFSORT PTF offers the SFF format to process this type of field and many variations.)
Quote:
I might have your influence to install DFSort.
If you or anyone else would like me to send you some files prepared by the DFSORT Team that discuss what we see as the advantages of DFSORT, as well as considerations for migrating from Syncsort to DFSORT, send me an e-mail (yaeger@us.ibm.com) offline. Please put "DFSORT" somewhere in your Subject line to catch my attention. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 13 Dec 2002 Posts: 45 Topics: 3 Location: 3rd Block from the SUN
Posted: Tue Jan 25, 2005 2:18 am Post subject:
Frank, Thanks for the information.
I apologise for the late reply.
FYI, I used COBOL instead to achieve this result.
I have sent you an offline mail per your request
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum