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

COUNT in trailer


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Sat Apr 17, 2010 9:51 pm
Reply with quote

Hello all ,

Wish to count the specific field and write to the trailer.

i/p file is VB RL =6

XXXX1
YYYYY2

O/P SHOULD BE vb RL=6

XXXX1
YYYYY2
CNT=3

THAT MEANS LAST 5 BYTE IS ADDED AND WRITTEN TO TRAILER.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Apr 18, 2010 1:29 am
Reply with quote

Hi Frank,

Sorry for the intrusion. . .

@shr_amar,

You have been a member here for almost 5 years and have seen what is available for your use.

What reason is there that you have not looked in the forum and used one of the solutions already available? Suggest you "clone" one pf the posted solutions and reply here if needed. If you need to ask about something, post the jcl and control statements you used, the messages generated by the process including messag ids, and your problem/question.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


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

PostPosted: Sun Apr 18, 2010 2:05 am
Reply with quote

Hi Frank,

Me too...

shr_amar,
how about something roughly based upon:
Code:
  SORT FIELDS=(1,4,CH,A)
    OUTFIL ...
      TRAILER1=('CNT=',TOT=(5,1,)))
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Mon Apr 19, 2010 6:40 am
Reply with quote

CICS Guy,
OP's file is VB, you need to account for RDW and sort fields should start at 5th byte.

shr_amar,
What do you mean when you say, "THAT MEANS LAST 5 BYTE IS ADDED AND WRITTEN TO TRAILER."??

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

Senior Member


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

PostPosted: Mon Apr 19, 2010 7:46 am
Reply with quote

sqlcode1 wrote:
OP's file is VB, you need to account for RDW and sort fields should start at 5th byte.
Yes, small details....
CICS Guy wrote:
roughly based
...
sqlcode1 wrote:
What do you mean when you say, "THAT MEANS LAST 5 BYTE IS ADDED AND WRITTEN TO TRAILER."??
That should be fairly clear based upon the OP's input and expected output examples....
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 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
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
Search our Forums:

Back to Top