Page 1 of 1

zero supress using jcl

PostPosted: Wed Apr 18, 2012 1:10 pm
by jvinoth
hi i need to supress the zero in the output dataset using the jcl ,

Please tell me how to do that

control card

 SORT FIELDS=COPY                                         
 OMIT COND=(08,08,CH,EQ,X'0000000000000000')             
 OUTREC FIELDS=(01:DATE,09:C'|',10:01,07,17:C'|',18:08,08,
       26:C'|',27:33,04,31:C'|',                         
       32:37,02,34:C'/',35:39,02,37:C'/',38:41,02,       
       40:C'|',41:43,02,43:C'/',44:45,02,46:C'/',         
       47:47,02,49:C'|',50:69,3,53:C'|',54:49,20) 

here 50:69,3 is the position to get the value which is need to be zero supressed.


ouput dataset

........|.......|40000003|....|........|........|005|..........
........|.......|40000003|....|........|........|001|..........
........|.......|40000003|....|........|........|004|..........
........|.......|40000003|....|........|........|001|..........
........|.......|40000003|....|........|........|002|..........

I need to supress the leading zeros in tha field


thanks

Re: zero supress using jcl

PostPosted: Wed Apr 18, 2012 1:20 pm
by BillyBoyo
On your "FIELDS=" why don't you try (on a copy) taking all the column numbers off except the first one. Makes it easier to follow, easier to code/maintain.

Have you look at "edit masks" for your unknown Sort product?

Re: zero supress using jcl

PostPosted: Wed Apr 18, 2012 10:08 pm
by Frank Yaeger
If you mean you want leading blanks instead of leading zeros for that field and the field is in ZD format, you can use:

50:69,3,ZD,EDIT=(IIT)

If you mean something else, then you need to explain clearly exactly what you mean. What does the input look like? What do you want the output to look like?

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080

Re: zero supress using jcl

PostPosted: Wed Apr 18, 2012 10:37 pm
by NicC
You cannot by JCL. But if you mean by sort then when you let us know which sort product you use (ICE messages from DFSORT and WER messages from SYNCSORT) then the topic can be moved to the appropriate part of the forum.

Re: zero supress using jcl

PostPosted: Thu Jun 07, 2012 7:35 pm
by jvinoth
thanks frank its working fine..