Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

I have a dataset in which records start with

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Fri Sep 24, 2004 11:30 am    Post subject: I have a dataset in which records start with
Reply with quote

hi

i hve a doubt. I hve a dataset in which records start with
1, 2 and 2 are thre, i want to retrieve only those records start with
1 and store in another dataset. How can i do ths ?

Can anyone help???

Col1 col2
1 df
2 dr
3 ew
1 rr
2 ss
1 pp

o/p will be ( in a new dataset)

Col1 Col2
1 df
1 rr
1 pp

thanks in advance

karthi G.
Back to top
View user's profile Send private message

sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Fri Sep 24, 2004 12:49 pm    Post subject:
Reply with quote

Karthi,

Following SORT will give you the result -
Code:
//SORT01   EXEC PGM=SORT
//SORTLIB  DD   DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD   UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE)
//SORTWK02 DD   UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE)
//SYSOUT   DD   SYSOUT=*
//SYSPRINT DD   SYSOUT=*
//SORTIN   DD   DSN=Your Input file,DISP=SHR
//SORTOUT  DD   DSN=Your output file
//SYSIN    DD   *
   SORT FIELDS=COPY
   INCLUDE COND=(1,1,ZD,EQ,1)
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us