IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to convert Character format to ZD format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Thu Oct 25, 2007 2:51 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 25, 2007 9:11 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Oct 25, 2007 9:45 pm
Reply with quote

Frank,

Please let me know, here SFF stands for 'Single File Format' or something else ?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Oct 25, 2007 9:56 pm
Reply with quote

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' icon_confused.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 25, 2007 10:16 pm
Reply with quote

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
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Oct 26, 2007 11:32 am
Reply with quote

Thanks so much Frank.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Oct 26, 2007 1:24 pm
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
Sriramoju Mahesh

New User


Joined: 05 Apr 2018
Posts: 1
Location: India

PostPosted: Thu Feb 03, 2022 12:41 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Thu Feb 03, 2022 5:04 am
Reply with quote

Take a look at the difference between
Code:
TO=ZDC
TO=ZDF

But it is not important; positive ZD values are accepted everywhere in any form.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Thu Feb 03, 2022 5:47 pm
Reply with quote

Start a new topic and avoid tailgating old ones.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top