Help on SORT controlcard



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Help on SORT controlcard

Postby ravisankarc » Fri May 23, 2014 3:13 pm

Hi All,

I have a dataset with FB 80/800 and it contains list of userid's (in the 1st position and length is 8 characters) as shown below. Actually I have more than 5000 userid's in the dataset.Here, I have just indicated the example but not given the actual userid.

userid1
userid2
userid3
userid4
userid5
userid6
userid7
userid8
userid9
userid10


I want to read each and every userid and put the desired output in the output dataset(indicated in SORTOUT). In order to do this I am using SYMNAMES concept with SORT and below is my JCL. With this JCL I am able to get the desired output for one userid. I want to know on how to refer the SYMNAMES through a dataset. My SORTIN dataset is a VB file contains huge data(more than 6lac records)

//STEP001  EXEC PGM=SORT                                     
//SYMNAMES DD *                                             
  TARG1,'USERID1'                                             
//SORTIN   DD DISP=SHR,DSN=i/p d/s               
//SORTOUT  DD DISP=MOD,DSN=o/p d/s     
//SYSPRINT DD SYSOUT=*                                       
//SYSOUT   DD SYSOUT=*                                       
//SYSIN    DD *                                             
  OPTION VLSCMP                                             
  INCLUDE COND=((29,05,CH,EQ,TARG1),AND,                     
               (09,2,CH,EQ,C'D '),AND,                       
               (79,2,BI,EQ,B'00000010'))                     
  SORT FIELDS=(29,44,CH,A)                                   
  OUTFIL VTOF,BUILD=(29,05,2X,13,4,2X,29,44,2X,C'PO',       
                     160:X)                                 
/*                                                           


Hope I am clear in explaining my requirement. Please look into it and help me on the same.

Thanks N Regards
Ravi
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: Help on SORT controlcard

Postby enrico-sorichetti » Fri May 23, 2014 3:42 pm

while the description might be clear to You
it is really very foggy for somebody willing to help

for example
first You say that the SORTIN is around 5000 records and the format is FB
after that You say that Your SORTIN is around 6lac and the format is VB

just take a decision ...

unless You wanted to say that You have
a LARGE VB file
a SMALL FB file
and You want to extract from the LARGE file some info about the USERIDS contained in the SMALL file

PS
since the official language of the forum is ENGLISH please refrain from using local units of measure ( lac' s)
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: Help on SORT controlcard

Postby ravisankarc » Fri May 23, 2014 4:24 pm

Hi Enrico,

Sorry for the ambiguity. I am telling that I have a dataset which has 5000 user id's. My requirement is I want to take each userid and it should be placed in the the below control card dynamically and should fetch the data from my SORTIN dataset and place the output in SORTOUT dataset.

OPTION VLSCMP
INCLUDE COND=((29,05,CH,EQ,USERID),AND,
(09,2,CH,EQ,C'D '),AND,
(79,2,BI,EQ,B'00000010'))
SORT FIELDS=(29,44,CH,A)
OUTFIL VTOF,BUILD=(29,05,2X,13,4,2X,29,44,2X,C'PO',
160:X)

Hope I am clear now.

Sorry to use the local units of measure and will not repeat in future.

Regards
Ravi
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: Help on SORT controlcard

Postby enrico-sorichetti » Fri May 23, 2014 4:30 pm

well... the ugly wording and the subsequent MISCOMMUNICATION
depend on the WRONG approach.

search this forum or the sibling one ( http://ibmmainframes.com )
for a JOINKEYS example ( quite a few around )
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


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post