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
 

 

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: 8593
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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 Wed Jul 26, 2017 7:35 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm


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