View previous topic :: View next topic
|
Author |
Message |
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
How to convert Character format to ZD format?
Example: I want to convert from -100 in CH format to ZD format using sort.
I tried as below
OPTION COPY
OUTREC FIELDS=(1,4,CH,TO=ZD,LENGTH=4) |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Binaya,
The correct DFSORT control statements for converting a value like -100 to a ZD value would be:
Code: |
OPTION COPY
OUTREC FIELDS=(1,4,SFF,TO=ZD,LENGTH=4)
|
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Frank,
Please let me know, here SFF stands for 'Single File Format' or something else ? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I just browsed through the DFSORT Manual, there is a full form of
SFF : Free Form (Signed Numeric)..what is 'Free Form' is there something called as 'slave form' |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
SFF is signed free form. UFF is unsigned free form. "Free form" means in "any" form as opposed to a specific form like ZD or PD.
For complete details of DFSORT's SFF and UFF formats, see:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
Thanks so much Frank. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Frank Yaeger wrote: |
SFF is signed free form. UFF is unsigned free form. "Free form" means in "any" form as opposed to a specific form like ZD or PD. |
Thanks for the clarification & link Frank |
|
Back to top |
|
|
Sriramoju Mahesh
New User
Joined: 05 Apr 2018 Posts: 1 Location: India
|
|
|
|
i used below sort card using SORT utility, in the result i can see that sign bit is being over punched on last character for only negative values but not for positive values. can someone please help me in understanding why sign bit is not getting over punched on last character for positive values.
OUTREC IFTHEN=(WHEN=(06,03,CH,NE,C'000'),
BUILD=(1:1,19,20:20,12,SFF,TO=ZD,LENGTH=11,31:32,56))
example:
-00000010012 is converted to 0000001001K
-00000010034 is converted to 0000001003M
+00000010056 is converted to 00000010056 |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2018 Location: USA
|
|
|
|
Take a look at the difference between
But it is not important; positive ZD values are accepted everywhere in any form. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Start a new topic and avoid tailgating old ones. |
|
Back to top |
|
|
|