Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem with 0.00 in Mask

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Bruno Oliveira

New User


Joined: 28 Jan 2010
Posts: 16
Location: Portugal

PostPosted: Mon Jun 20, 2011 11:27 pm    Post subject: Problem with 0.00 in Mask
Reply with quote

Hi there.

I'm trying to find how to get this mask working with the dot but with no luck...

With this SORTIN value in hex:

Code:
000000
00000C
------
     
000040
00000C


With this job

Code:
//STEP02   EXEC PGM=SORT                   
//SYSOUT   DD  SYSOUT=*                     
//SORTMSG  DD  SYSOUT=*                     
//SORTIN   DD  *                           
                                           
                                           
//SORTOUT  DD  SYSOUT=*                     
//SYSIN    DD *                             
  SORT FIELDS=COPY                         
  OUTFIL FILES=OUT,                         
  IFTHEN=(WHEN=INIT,                       
  BUILD=(1,6,PD,EDIT=(SIIII.TT),SIGNS=(,-)))


I get:

Code:
      00
    4.00


But I want to get '.00' (without the leading zero but with the dot):

Code:
     .00
    4.00


Can you help me, please?

Thanks,
Bruno Oliveira
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Jun 20, 2011 11:35 pm    Post subject:
Reply with quote

What you say you are getting and what you say you want look the same to me.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jun 20, 2011 11:43 pm    Post subject: Reply to: Problem with 0.00 in Mask
Reply with quote

Hi Craig,

The "want to get" has a decimal point in each output line.

d
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon Jun 20, 2011 11:46 pm    Post subject:
Reply with quote

Quote:
What you say you are getting and what you say you want look the same to me.


Look more closely. The first instance for +0 ( 00) does not have a period whereas the second instance (.00) for +0 does.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Jun 21, 2011 12:11 am    Post subject:
Reply with quote

Bruno,

You cannot force the period to appear for values without an integer with that edit mask. Assuming you want .dd for +dd and -.dd for -dd, I'd suggest you just post-process the values after editing to get what you want. For example, you could use these DFSORT control statements:

Code:

  SORT FIELDS=COPY
  OUTFIL FILES=OUT,
  IFTHEN=(WHEN=INIT,
    BUILD=(1,6,PD,EDIT=(SIIII.TT),SIGNS=(,-))),
  IFTHEN=(WHEN=(6,1,CH,EQ,C' '),
    OVERLAY=(6:C'.')),
  IFTHEN=(WHEN=(6,1,CH,EQ,C'-'),
    OVERLAY=(5:C'-.'))


This would give you output values like this:

Code:

     .00   
    4.00   
   -4.00   
    -.00   
    -.01   
     .01   


Why do you NOT want the zero before the period? Normally people do, so they use T.TT which results in 0.dd and -0.dd.
Back to top
View user's profile Send private message
Bruno Oliveira

New User


Joined: 28 Jan 2010
Posts: 16
Location: Portugal

PostPosted: Tue Jun 21, 2011 6:40 pm    Post subject:
Reply with quote

Frank Yaeger,

first of all, thank you for your reply.

I do not want the zero before the period, because I'm replacing a DB2 unload (FORMAT DELIMITED) by DFSORT. DB2 Unload FORMAT DELIMITED uses .00 when a numeric field has a zero value.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Jun 21, 2011 9:25 pm    Post subject:
Reply with quote

Interesting.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us