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
 
Record select and update trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: updating Count in trailer record
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    Post subject:
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: 8631
Location: Back in jolly old England

PostPosted: Sat Jun 07, 2008 3:19 pm    Post subject:
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    Post subject:
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    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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts Conversion of DLI update Jobs as BMP ... Gopinath Shanmugam IMS DB/DC 3 Wed Dec 20, 2017 12:02 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

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