Sort Card to Mask the particular field values



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

Sort Card to Mask the particular field values

Postby naveenbn » Thu Jan 03, 2013 6:24 pm

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
naveenbn
 
Posts: 3
Joined: Thu Jan 03, 2013 1:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort Card to Mask the particular field values

Postby enrico-sorichetti » Thu Jan 03, 2013 6:40 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Sort Card to Mask the particular field values

Postby naveenbn » Thu Jan 03, 2013 6:50 pm

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.
naveenbn
 
Posts: 3
Joined: Thu Jan 03, 2013 1:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort Card to Mask the particular field values

Postby BillyBoyo » Thu Jan 03, 2013 6:57 pm

Have a look at the reporting functions of OUTFIL in your Sort manual. We don't even know which product you use.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Sort Card to Mask the particular field values

Postby Akatsukami » Thu Jan 03, 2013 7:03 pm

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?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Sort Card to Mask the particular field values

Postby dick scherrer » Thu Jan 03, 2013 10:37 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Sort Card to Mask the particular field values

Postby enrico-sorichetti » Fri Jan 04, 2013 6:52 am

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
tivrfoa (Tue Jan 08, 2013 7:04 pm)
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Sort Card to Mask the particular field values

Postby naveenbn » Tue Jan 08, 2013 6:45 pm

Thanks a lot Enrico, i am able to use above hint and resolve and its working as per my requirement.

Regards,
Naveen.
naveenbn
 
Posts: 3
Joined: Thu Jan 03, 2013 1:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort Card to Mask the particular field values

Postby NicC » Wed Jan 09, 2013 2:21 am

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?
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


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post