Page 1 of 1

Sort Card to Mask the particular field values

PostPosted: Thu Jan 03, 2013 6:24 pm
by naveenbn
Hi,

i am trying to mask the particular field values that appears more than once, as below:

Input file:
Employee name    Dep No
abc                      666
xyz                      123
xyz                      888
xyz                      222
bat                      345



Output file:
Employee name    Dep No
abc                      666
xyz                      123
                         888
                         222
bat                      345


Please provide me the sort card to achieve the above.

Code'd and aligned

Re: Sort Card to Mask the particular field values

PostPosted: Thu Jan 03, 2013 6:40 pm
by enrico-sorichetti
Please provide me the sort card to achieve the above.


this is a help forum, not a provide working solutions for lazy TS' s one

the best way to get good answers is to post good questions

see here for pretty useful advice
http://catb.org/~esr/faqs/smart-questions.html

Re: Sort Card to Mask the particular field values

PostPosted: Thu Jan 03, 2013 6:50 pm
by naveenbn
Hi Enrico,

Since it is a complex report generation using JCl SORT with lot of steps, i couldnt give much info and also googled, went thru books, but couldnt get the solution as per my requirement, then decided to post it. Thanks for your suggestion.
Naveen.

Re: Sort Card to Mask the particular field values

PostPosted: Thu Jan 03, 2013 6:57 pm
by BillyBoyo
Have a look at the reporting functions of OUTFIL in your Sort manual. We don't even know which product you use.

Re: Sort Card to Mask the particular field values

PostPosted: Thu Jan 03, 2013 7:03 pm
by Akatsukami
naveenbn wrote:Since it is a complex report generation using JCl SORT with lot of steps, i couldnt give much info and also googled, went thru books, but couldnt get the solution as per my requirement, then decided to post it. Thanks for your suggestion.
Naveen.

My suggestion is that you fulfill what doesn't seem, from your description, to actually be a very complex requirement, by writing a program. You can program, yes?

Re: Sort Card to Mask the particular field values

PostPosted: Thu Jan 03, 2013 10:37 pm
by dick scherrer
Hello and welcome to toe forum,

If you post which sort product you are using, your topic will be moved to the proper part of the forum.

If you do not know which product is being used, run any external sort and post the first few lines of the informational output - including the message ids.

Re: Sort Card to Mask the particular field values

PostPosted: Fri Jan 04, 2013 6:52 am
by enrico-sorichetti
just to give You an hint on an <unformatted( no headers/trailers)> file

 ****** ***************************** Top of Data ******************************
 - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
 000004 //S1      EXEC PGM=SORT
 000005 //SYSPRINT  DD SYSOUT=*
 000006 //SYSOUT    DD SYSOUT=*
 000007 //SORTIN    DD *
 000008 AAA 111
 000009 AAA 112
 000010 AAA 113
 000011 CCC 312
 000012 CCC 312
 000013 CCC 313
 000014 CCC 313
 000015 CCC 313
 000016 BBB 212
 000017 BBB 212
 000018 BBB 213
 000019 BBB 213
 000020 BBB 213
 000021 //SORTOUT   DD SYSOUT=*,
 000022 //             DCB=(RECFM=FB,LRECL=80)
 000023   SORT   FIELDS=COPY
 000024   INREC  IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,3,ZD,RESTART=(1,3)))
 000025   OUTREC IFOUTLEN=80,
 000026          IFTHEN=(WHEN=(81,3,ZD,GT,1),OVERLAY=(1:C'   '))
 000027 //*
 ****** **************************** Bottom of Data ****************************


to get

********************************* TOP OF DATA **********************************
AAA 111
    112
    113
CCC 312
    312
    313
    313
    313
BBB 212
    212
    213
    213
    213
******************************** BOTTOM OF DATA ********************************


up to You to modify it according to Your record layout

Re: Sort Card to Mask the particular field values

PostPosted: Tue Jan 08, 2013 6:45 pm
by naveenbn
Thanks a lot Enrico, i am able to use above hint and resolve and its working as per my requirement.

Regards,
Naveen.

Re: Sort Card to Mask the particular field values

PostPosted: Wed Jan 09, 2013 2:21 am
by NicC
Naveen - you still have not said which sort product you are using. This is a JCL forum not a SORT forum so the topic has to be moved. So...do you use DFSort or Syncsort?