IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Record select and update trailer


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mhesarag

New User


Joined: 07 Jun 2008
Posts: 2
Location: Bangalore

PostPosted: Sat Jun 07, 2008 3:14 pm
Reply with quote

Hi All,

I have the following reords
HH20080607
DUD01
DGS01
DUD01
DGS01
TT2008060700004

I want the eleminate record with DGS and also update Trailer count

i.e in this case it would 2
Back to top
View user's profile Send private message
Mhesarag

New User


Joined: 07 Jun 2008
Posts: 2
Location: Bangalore

PostPosted: Sat Jun 07, 2008 3:17 pm
Reply with quote

Hi,

Can I get the sort card to do it.

Thanks,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Jun 07, 2008 3:19 pm
Reply with quote

Please do not post a new question in an existing thread

Yes, you can use a sort product to achieve this. Please search the forum for the numerous examples that have already been shown.
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Sat Jun 07, 2008 7:45 pm
Reply with quote

Here is a syncsort job for your requirement.
Code:

//S1      EXEC PGM=SORT     
//SYSOUT  DD SYSOUT=*       
//SORTIN  DD *             
HH20080607                 
DUD01                       
DGS01                       
DUD01                       
DGS01                       
TT2008060700004             
/*                         
//SORTOUT DD SYSOUT=*                                       
//SYSIN  DD *                                               
    OPTION COPY                                             
    OMIT COND=(1,3,CH,EQ,C'DGS')                             
    INREC FIELDS=(1,80,SEQNUM,5,ZD)                         
    OUTREC IFTHEN=(WHEN=(1,2,CH,EQ,C'TT'),                   
           BUILD=(1,10,(81,5,ZD,SUB,+2),EDIT=(TTTTT),65X)), 
           IFTHEN=(WHEN=NONE,                               
           BUILD=(1,80))                                     
/*                                                           


Output :
Code:

HH20080607     
DUD01           
DUD01           
TT2008060700002


--Parag
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top