zero supress using jcl



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

zero supress using jcl

Postby jvinoth » Wed Apr 18, 2012 1:10 pm

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
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: zero supress using jcl

Postby BillyBoyo » Wed Apr 18, 2012 1:20 pm

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: zero supress using jcl

Postby Frank Yaeger » Wed Apr 18, 2012 10:08 pm

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
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: zero supress using jcl

Postby NicC » Wed Apr 18, 2012 10:37 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: zero supress using jcl

Postby jvinoth » Thu Jun 07, 2012 7:35 pm

thanks frank its working fine..
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time


Return to JCL