View previous topic :: View next topic
|
Author |
Message |
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
|