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
 

 

How to truncate leading zeros in EZEETRIEVE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 04, 2013 1:14 pm    Post subject: How to truncate leading zeros in EZEETRIEVE
Reply with quote

Hi All,

I have one number variable cobol declaration for this is below -
01 WS-NO PIC S9(09) COMP.

probable values are only two digits like - 15,27,30 etc.

I am converting this Binary value in displayble format by using EZEETRIEVE but is' taking leading zeros like - 000000015, 000000027 etc.

I want to truncate these leading zeros in Ezzetrive -

I have tried by providing MASK in output file variable as below -

I-NO 001 004 B 0
O-NO 038 009 N MASK 'ZZZZZZZ99'

but this is not working -

I know by Display option if we display the values it truncates leading zeros but that will come in SYSPRINT, I want to write it to output file directly.

Please provide your suggestions.

Thanks,
Sandip Walsinge
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Mar 04, 2013 1:21 pm    Post subject:
Reply with quote

Ask at your company. And also which program this is : EZEETRIEVE ?
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 04, 2013 1:35 pm    Post subject:
Reply with quote

Hi Peter,

yes it is Ezeetrieve. In Ezeetrieve I want to trunacte leading zeros.

(Ezeetrive version - EASYTRIEVE PLUS 11.5-C )
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Mar 04, 2013 1:36 pm    Post subject: Reply to: How to truncate leading zeros in EZEETRIEVE
Reply with quote

if You had taken an holistic approach to EZEETRIEVE You would not have had the need to ask

but why not ask one of the trainers in Your company ???

from the walsinge page
Quote:
At Walsinge Technologies, we transform you from a conventional Engineering or Science Graduate into a leading-edge Software Engineer. We make sure you become the first preference in the process of IT Recruitment.


what a truckload of horse manure icon_cool.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 04, 2013 1:48 pm    Post subject: Reply to: How to truncate leading zeros in EZEETRIEVE
Reply with quote

Also, a minimal amount of searching/browsing will come up with replies to several questions which are the same.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Mar 04, 2013 1:53 pm    Post subject:
Reply with quote

Come on Bill, the TS is too busy to run his company.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 04, 2013 2:41 pm    Post subject: Reply to: How to truncate leading zeros in EZEETRIEVE
Reply with quote

Well, I'm feeling sorry for the people in the class, hanging on the answer to a question...
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Mar 04, 2013 2:46 pm    Post subject:
Reply with quote

Well as for me the TS is a f.. disgrace for the ICT profession.
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 04, 2013 3:01 pm    Post subject:
Reply with quote

Hi enrico/Peter/Bill,

Thanks for your support guys, I have been member of IBMMAINFRAMES.COM since last 6 years but I never got such reply from you. I really respect u all guys for your technical knowledge.

I don't want to say anymore.

Thanks for your relplies.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Mar 04, 2013 3:05 pm    Post subject:
Reply with quote

Hey, the TS stripped his profile.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Mar 04, 2013 3:09 pm    Post subject: Reply to: How to truncate leading zeros in EZEETRIEVE
Reply with quote

let' s put things in a clear perspective ...

You say in Your profile that You are a
Director of "Walsinge technologies" ...
nobody asked You to do that

from Your company homepage Your "communication experts" incense/praise/<***lick> your company for quality, expertise, holistic vision of mainframe technologies and ... ... ...

Your course catalog provides EZEETRIEVE training

and You wonder why we are pissed ...
when we see such a poor approach to a serious profession as IT

meditate a bit, please, meditate
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 04, 2013 3:13 pm    Post subject: Re: How to truncate leading zeros in EZEETRIEVE
Reply with quote

Well then, you should



  • Know how to use the Code tags/Preview button
  • Know how to spell the product you are using: EZEETRIEVE, Ezzetrive, which you clung to even when posting the real name, "EASYTRIEVE PLUS 11.5-C"
  • Know to search/browse for similar questions
  • Know to read the manual
  • Know to search the internet
  • Know not to define Cobol fields as COMP S9(9) or 9(9)
  • Know not to define 9-digit fields which only need to hold two digits
  • Know how people are going to react after you don't take notice of the above and post in such a manner after being on the site for six years
  • etc


Sharpen-up next time, or it'll be more of the same.
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 04, 2013 3:18 pm    Post subject:
Reply with quote

Hi Enrico,

I understood your guys concern, but it was not for my classes it was for my personal understaing.
It was my mistake that I it put in my signature, I appologize for that. I love mainframe and this site, I love to try things which are new to me in mainframe, it is not just for teaching, it is my personal interest.

Thanks once again.
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 04, 2013 3:21 pm    Post subject:
Reply with quote

Hi Bill,

Thanks for your suggestions, going forward I will take of these things.
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Mon Mar 04, 2013 3:52 pm    Post subject:
Reply with quote

Hi Sandip,

With littile search and trial-error its easily doable
Try belwo code

Declarations
Code:
I-NO                                      001 004 B 0

DEFINE I-NO-NUM                             W 16  N VALUE 0       
DEFINE I-NO-NUM-BYTE   I-NO-NUM                1   N OCCURS 16     
DEFINE I-NO-ALPHA                           W 16  A               
DEFINE I-NO-ALPHA-BYTE  I-NO-ALPHA          1   A  OCCURS 16

DEFINE C-SUB                             W 2   N
DEFINE D-SUB                             W 2   N
DEFINE WS-CHECK                        W 1   A VALUE ' '


Code
Code:
I-NO-NUM    = I-NO 
D-SUB       = 0 
C-SUB       = 0 
WS-CHECK    = 'Y'

DO WHILE C-SUB LE +15                               
    C-SUB = C-SUB + 1                               
    IF I-NO-NUM-BYTE (C-SUB) NE 0                     
       D-SUB = D-SUB + 1                           
       I-NO-ALPHA-BYTE  (D-SUB) = I-NO-NUM-BYTE (C-SUB)   
       WS-CHECK = 'N'                               
    ELSE                                           
       IF WS-CHECK NE 'Y'                           
          D-SUB = D-SUB + 1                         
          I-NO-ALPHA-BYTE   (D-SUB) =I-NO-NUM-BYTE (C-SUB)
       END-IF                                       
    END-IF                                         
END-DO                                             


At the end of Do-While Loop I-NO-ALPHA will have value without leading zeros.

See if this works for you..

Regards,
Chandan
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 04, 2013 4:10 pm    Post subject: Reply to: How to truncate leading zeros in EZEETRIEVE
Reply with quote

Remember to set I-NO-ALPHA to space before the loop.

No need for 16 digits, as field only has nine.

You could just "redefine" the 16 N 0 as 16 x 1 A and clobber leading zeros to space, rather than move non-leading-zero digits individually.

Gets trickier with "other editing" required, rather than just the suppression of leading zeros.

If I write an entire Cobol sub-program for this, can you test it, chandan-inst?
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Mon Mar 04, 2013 4:35 pm    Post subject:
Reply with quote

oops my bad.. I missed to mention regarding initializing I-NO-ALPHA

Agree with you Bill.. No need of 16 bytes there

It was a ready code available with me and thats the reason I missed to change the 16 to 9/

I did it with trial and error which is the only thing probably TS missed else he could have get his done esily.

Yes Bill I can test this Out.

Writing a cobol sub program is much easier option just we need to call that program for every conversion.

Regards,
Chandan
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join key - Populate Zeros when Unpair... rexx77 DFSORT/ICETOOL 6 Thu May 12, 2016 12:22 am
No new posts Syncsort to remove the leading spaces V S Amarendra Reddy SYNCSORT 5 Fri Jan 08, 2016 9:47 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Jobs in Leading Indian MNC aman2248 Mainframe Jobs 0 Mon Dec 21, 2015 3:25 pm
No new posts Removing Leading Spaces and Removing ... rahulpala COBOL Programming 4 Fri Sep 04, 2015 4:58 am
No new posts CSV file , to display numeric data w... Deepthy Jose P JCL & VSAM 10 Fri Nov 21, 2014 12:50 pm


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