MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Collecting Records in Multiple Datasets

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
davinski.bby
Beginner


Joined: 30 Jul 2007
Posts: 31
Topics: 10

PostPosted: Tue Jul 31, 2007 10:02 am    Post subject: Collecting Records in Multiple Datasets Reply with quote

Hi,

I have 10 datasets with the same record layout.

Code:
FIRSTNAME (Pic X 10)
LASTNAME  (Pic X 10)
AGE       (Pic 9 3)
GENDER    (Pic X)


I would like to get all records with 'M' as GENDER and place them in a new dataset.

How do I do this?
Thanks.
Back to top
View user's profile Send private message
davinski.bby
Beginner


Joined: 30 Jul 2007
Posts: 31
Topics: 10

PostPosted: Tue Jul 31, 2007 10:07 am    Post subject: Reply with quote

Hi,

Can i also get records with duplicate firstname and lastname and put them in a single dataset/

Thanks.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jul 31, 2007 10:10 am    Post subject: Reply with quote

davinski.bby,

Try this

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD DSN=your input dataset 01,
//            DISP=SHR                           
//         DD DSN=your input dataset 02,
//            DISP=SHR                           
//         DD DSN=your input dataset 03,
//            DISP=SHR
//         DD DSN=your input dataset 04,
//            DISP=SHR
//         DD DSN=your input dataset 05,
//            DISP=SHR
//         DD DSN=your input dataset 06,
//            DISP=SHR
//         DD DSN=your input dataset 07,
//            DISP=SHR
//         DD DSN=your input dataset 08,
//            DISP=SHR
//         DD DSN=your input dataset 09,
//            DISP=SHR
//         DD DSN=your input dataset 10,
//            DISP=SHR
//SORTOUT  DD DSN=your output file,
//            DISP=(NEW,CATLG,DELETE),           
//            UNIT=SYSDA,                         
//            SPACE=(CYL,(X,Y),RLSE)           
//SYSIN    DD *                                 
  SORT FIELDS=COPY           
  INCLUDE COND=(24,1,CH,EQ,C'M')                   
/*                             


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jul 31, 2007 10:13 am    Post subject: Reply with quote

davinski.bby wrote:
Hi,

Can i also get records with duplicate firstname and lastname and put them in a single dataset/

Thanks.


Please search before posting. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=9&highlight=dups

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group