Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get the records those which are starting with FST

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Bandita Bahubalendra

New User


Joined: 08 May 2008
Posts: 15
Location: Bangalore

PostPosted: Thu May 08, 2008 9:51 am    Post subject: How to get the records those which are starting with FST
Reply with quote

Hi! This is your First post in our Forums! So please be sure to 1) Use meaningful and descriptive Topic Title 2) Try to post your query in the relevant forum category 3) Make sure your query is not already posted and solved in our forums, Use the Search facility and avoid Reposts! If you are following the above rules, delete this message and post your query here!

Hi friends
10 GDGs are there,all are having some records.we need to find all the records which are starting wit Fst in the 1st position. for this we need to develope a jcl.
for eg.input - a.b.g001v001
-fst
-1
output-A dataset containing all the rows starting with the text “FST” from all the generations of the GDG .
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8646
Location: Back in jolly old England

PostPosted: Thu May 08, 2008 11:33 am    Post subject:
Reply with quote

Taking a look at the fine manual I found something like this. It took me about 60 seconds.
Code:

  SORT      FIELDS=COPY                         
  INCLUDE   COND=(pos,len,format,EQ,C'whatever')
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu May 08, 2008 8:45 pm    Post subject: Reply to: How to get the records those which are starting wi
Reply with quote

Bandita Bahubalendra,

The following DFSORT JCL will give you the desired results.

Code:

//STEP0100 EXEC PGM=ICEMAN       
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD DSN=your gdg base name,
//            DISP=SHR           
//SORTOUT  DD DSN=your output file with FST records,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
  SORT FIELDS=COPY               
  INCLUDE COND=(1,3,CH,EQ,C'FST')
/*


If your input is a vb file then you use this. The first 4 bytes have the RDW

Code:

//STEP0100 EXEC PGM=ICEMAN       
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD DSN=your gdg base name,
//            DISP=SHR           
//SORTOUT  DD DSN=your output file with FST records,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
  SORT FIELDS=COPY               
  INCLUDE COND=(5,3,CH,EQ,C'FST')
/*
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm
No new posts Merging records, but not all the time prino DFSORT/ICETOOL 17 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 15 Fri Feb 09, 2018 10:38 pm
No new posts Why is SORT rearranging records that ... cschablow DFSORT/ICETOOL 4 Wed Jan 24, 2018 10:14 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us