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
 

 

copying after the matched record is found

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

New User


Joined: 26 Feb 2007
Posts: 71
Location: bangalore

PostPosted: Tue Sep 20, 2011 12:59 pm    Post subject: copying after the matched record is found
Reply with quote

Hi,

I have input dataset as mentioned below:

1
2
3
4
TRAILER
5
6
7

I want output dataset should contain:
TRAILER
5
6
7

Could anyone of you suggest.
Back to top
View user's profile Send private message

THINKSRINIII
Warnings : 1

New User


Joined: 09 Jan 2009
Posts: 88
Location: India

PostPosted: Tue Sep 20, 2011 3:01 pm    Post subject:
Reply with quote

Let us know the Lrecl,recfm of the file.
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Tue Sep 20, 2011 3:03 pm    Post subject:
Reply with quote

Hi Deepak,

Your example is not very clear and you have not provided any rules to achieve your output. Please answer the below question.

1, Will the input file have only one 'TRAILER' record?
2, IF Multiple record found, what needs to done?
3, In subject you have mentioned 'Matching record'. How to identify Matching records?
4, What is the RECFM and LRECL of your IN/OUT files.
Back to top
View user's profile Send private message
deepak.kec

New User


Joined: 26 Feb 2007
Posts: 71
Location: bangalore

PostPosted: Tue Sep 20, 2011 3:15 pm    Post subject:
Reply with quote

1, Will the input file have only one 'TRAILER' record?
Yes it will have only one 'TRAILER' record

2, IF Multiple record found, what needs to done?
N/A

3, In subject you have mentioned 'Matching record'. How to identify Matching records?
Matching record is the 'TRAILER' record. Once the control reaches there all the records after that should be written to output file including TRAILER records.

4, What is the RECFM and LRECL of your IN/OUT files.
RECFM is Fixed block and LRECL is 80 of IN/OUT files.

Please let me know in case you need any additional information.
Back to top
View user's profile Send private message
THINKSRINIII
Warnings : 1

New User


Joined: 09 Jan 2009
Posts: 88
Location: India

PostPosted: Tue Sep 20, 2011 3:20 pm    Post subject:
Reply with quote

Assuming that it is FB and record length 80.

Code:

//SYSIN    DD *                                                       
 OPTION COPY                                                         
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,7,CH,EQ,C'TRAILER'),PUSH=(81:ID=1))
 OUTFIL OMIT=(81,1,CH,EQ,C' '),BUILD=(1,80)                           
Back to top
View user's profile Send private message
deepak.kec

New User


Joined: 26 Feb 2007
Posts: 71
Location: bangalore

PostPosted: Tue Sep 20, 2011 3:33 pm    Post subject:
Reply with quote

Thanks a ton!!!it worked
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Sep 20, 2011 10:33 pm    Post subject:
Reply with quote

Deepak,

Note that this solution (and many others) are covered by my "Smart DFSORT Tricks" paper at:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094
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 Record Not found in AlX but record re... mukun264 COBOL Programming 0 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am


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