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
 

 

How to Update trailer Count after omitting Detail records

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

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Thu May 06, 2010 2:45 pm    Post subject: How to Update trailer Count after omitting Detail records
Reply with quote

Hi,
I have one input file with Header, Detail, and Trailer record. There are more than one header and trailer records. I want to omit some Detail records from the file and want to update any one trailer record.

Input File -
RECFM = FB
LRECL = 1300

01 REC-TYPE PIX X(02).
88 HEADER-REC VALUE '10'.
88 DETAIL-REC VALUE '20'.
88 TRAILER-REC VALUE '90'.

Recorde to be Omited

OMIT COND=(612,02,BI,EQ,X'00')

I have used following SORT CARD but it's not working.

SORT FIELDS=COPY
OMIT COND=(612,02,BI,EQ,X'00')
OUTREC IFOUTLEN=1300,
IFTHEN=(WHEN=INIT,OVERLAY=(1301:SEQNUM,9,ZD,START=0)),
IFTHEN=(WHEN=(1,2,ZD,EQ,90),OVERLAY=(3:1301,9))

Thanks,
Sandip Walsinge.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu May 06, 2010 3:12 pm    Post subject:
Reply with quote

What do you mean by "it's not working"?
Please post all sysouts related to "it's not working".
What does the input look like?
What does the "it's not working" output look like?
What would the output look like if it was working?
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Thu May 06, 2010 3:20 pm    Post subject:
Reply with quote

Hi CICS Guy,

Input File looks like this -

10 20100505022141
10 20100505030941
20082010050501554914SU 120100504YS0101N777777.............
20082010050501554914SC 03120100430NS0101N777777............
20082010050501554914SC 03120100430NS0101N777777...........
20082010050501554914SM 04120100504NS0101N777777.............
20082010050501554914SC 03120100504NS0101N777777.............
.
.
.
90000007377
90000147370


In output file it's updating all trailer records, but I want update just one Trailer record.
It should update any one Trailer record from below Trailer record
90000007377
90000147370
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu May 06, 2010 9:58 pm    Post subject:
Reply with quote

sandip_mainframe,

Assuming that you don't consider the header records as part of count and only consider the detail records, here is a job which would update the FIRST trailer record (90 in pos 1 thru 2)

Code:

//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=Your input 1300 FB file,DISP=SHR
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  OMIT COND=(612,02,BI,EQ,X'00')                                     
  OUTREC IFOUTLEN=1300,                                             
  IFTHEN=(WHEN=(1,2,CH,NE,C'10'),OVERLAY=(1301:SEQNUM,9,ZD,START=0, 
                SEQNUM,8,ZD,RESTART=(1,2)),HIT=NEXT),               
  IFTHEN=(WHEN=(1,2,ZD,EQ,90,AND,1310,8,ZD,EQ,1),OVERLAY=(3:1301,9))
//*
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Fri May 07, 2010 2:12 pm    Post subject: Reply to: How to Update trailer Count after omitting Detail
Reply with quote

Hi Skolusu,
Thanks a lot for your help. The sort card provided by you is working.

Do you have any documentation for such a complex sort card, if you have any document or any link please post it, so that I can learn such a complex sort cards.


Thanks,
Sandip Walsinge
Pune.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 07, 2010 2:24 pm    Post subject:
Reply with quote

Quote:
Do you have any documentation for such a complex sort card, if you have any document or any link please post it, so that I can learn such a complex sort cards.

First thing... This is not complex sortcard...

Other thing, If you need such good examples you can have look at various posts and their answers by Kolusu\Frank. under DFSORT\ICETOOL part of the forum
That would give you fair idea of its usage.

If you are not aware of DFSORT\ICETOOL then you can start from www.ibm.com/storage/dfsort/
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 07, 2010 9:33 pm    Post subject:
Reply with quote

sandip_mainframe,

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am


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