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
 
Copy Header and Trailer with only first 1000 detail records

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

New User


Joined: 14 Nov 2006
Posts: 16

PostPosted: Thu Aug 14, 2008 3:32 pm    Post subject: Copy Header and Trailer with only first 1000 detail records
Reply with quote

I have the following requirement:

Copy Header and Trailer from the input VSAM file to the output VSAM file
with only first 1000 detail records.

header with first 3 record characters 0
trailer with first 3 record characters 9
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: Thu Aug 14, 2008 9:20 pm    Post subject:
Reply with quote

You can do this quite easily with the new SUBSET operator available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file (VSAM)
//OUT DD DSN=...  output file (VSAM)
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) KEEP INPUT RRN(1,1001) TRAILER VSAMTYPE(V)
/*


For complete details on the new SUBSET function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

If you don't have PTF UK90013, ask your System Programmer to install it.

Alternatively, you can use a DFSORT job like this:

Code:

//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VSAM)
//SORTOUT DD DSN=...  output file (VSAM)
//SYSIN    DD    *
  OPTION COPY
  RECORD TYPE=V
  INREC BUILD=(1,4,5:SEQNUM,8,ZD,13:5)
  OUTFIL INCLUDE=(5,8,ZD,LE,+1001,OR,13,3,CH,EQ,C'999'),
    BUILD=(1,4,5:13)
/*
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 Copy Specific Groups V S Amarendra Reddy SYNCSORT 10 Thu Jan 11, 2018 1:16 am
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

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