MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Suppress trailing zeros via SORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
nbdtrjk_1
Beginner


Joined: 14 Jun 2021
Posts: 11
Topics: 4

PostPosted: Tue Jun 15, 2021 3:04 am    Post subject: Suppress trailing zeros via SORT Reply with quote

All,
I did search before posting my requirement but not finding any results Even I tried via EDIT=(IIIIIIT) type but it did only removed leading zeros

I have requirement to suppress decimal trailing zeros via sort. Could someone assist me on this

Code:
I/P (FB)
  12.00
1235.909
1788.190
 555.10

O/p(after suppressing trailing zeros)
  12.0
1235.909
1788.19
 555.1


Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Tue Jun 15, 2021 10:28 am    Post subject: Reply with quote

nbdtrjk_1,

what is the format of the data ? Is it ZD or PD or plain display data like that you have shown?

If the data is as is as you have shown is the decimal at a constant place?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nbdtrjk_1
Beginner


Joined: 14 Jun 2021
Posts: 11
Topics: 4

PostPosted: Tue Jun 15, 2021 8:55 pm    Post subject: Reply with quote

Hi Kolusu,

It will the plain display data what I have shown in above post and constant place(say starts at 1st post and 8 bytes length)

Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Wed Jun 16, 2021 6:15 pm    Post subject: Reply with quote

nbdtrjk_1,

Try this
Code:

//STEP0100 EXEC PGM=SORT                           
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD *                                     
----+----1----+----2----+----3----+----4----+----5--
  12.00                                             
1235.909                                           
1788.190                                           
 555.10                                             
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                     
  OPTION COPY                                       
  INREC IFTHEN=(WHEN=(7,2,UFF,EQ,0),OVERLAY=(7:2X)),
        IFTHEN=(WHEN=(8,1,UFF,EQ,0),OVERLAY=(8:1X))
/*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nbdtrjk_1
Beginner


Joined: 14 Jun 2021
Posts: 11
Topics: 4

PostPosted: Wed Jun 16, 2021 9:02 pm    Post subject: Reply with quote

Thanks Kolusu. Given code working fine
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group