View previous topic :: View next topic
|
Author |
Message |
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
Hi,
I have 2 file say with 10 records each
File 1 :-
Record1
Record2
Record3
Record4
Record5
Record6
Record7
Record8
Record9
Record10
File 2 :-
Record1
Record2
Record3
Record4
Record5
Record6
Record7
Record8
Record9
Trailer record
Trailer Record = 'shop name, product name,account'
I have to concat two file and display total no of counts in 3rd file.
When i Contact /Merge two file using sort i have the O/P as follows :-
Record1
:::
:::
:::
Record19
Trailer record
As my requiremt says to display count also in Trailer record so i will have to modify my trailor record as
'COUNT shop name, product name,account'
when i use the following SORT CARD it will provide me the total no of counts but at the bottom of the O/P file that ie 3rd file
TRAILER1=(COUNT=(M10,LENGTH=10))
so the O/P will be as follows
Record1
:::
:::
:::
Record19
Trailer record
COUNT
But my requirement is to populate Count in trailor record only what i mean to say is that the Trailor Record Should be as follows :-
'COUNT shop name, product name,account'
Please advise how to achieve this situation. It will be highly appreciated.
Thank you in Anticipation of response. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT and the topic will be moved to the DFSORT forum by one of the moderators. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and the topic will remain in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.
Code: |
//SORTSTEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY |
You also need to provide more detail than you already have.
The RECFM & LRECL of the input and output files.
The position, length and format of the key fields. |
|
Back to top |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
Hi EXPAT,
I am using DFSORT and DCB of Both I/P and O/P files are same and both the files are already sorted on their key field.
Problem lies in Populating Count in Trailor Field
When i execute the below card
//SYSIN DD *
SORT FIELDS=COPY
TRAILER1=(COUNT=(M10,LENGTH=10))
/*
My Output will be as follows :-
Record1
:::
:::
:::
Record19
Trailer record
COUNT
[ File 1 has 10 records and File 2 has 10 records]
but i want my O/p as :-
Record1
:::
:::
:::
Record19
Count,Trailer record
Hope you get what i want to mean.
Thank You |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
expat wrote: |
Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
You also need to provide more detail than you already have.
The RECFM & LRECL of the input and output files.
The position, length and format of the key fields. |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
deleted by dbz |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Harsh,
It's really not clear what you want to do. It's especially not clear what the original trailer record looks like and what you want the new trailer record to look like, and whether there's something in the trailer record that identifies it (e.g. '9' in position 1).
Please show an example of the actual records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. |
|
Back to top |
|
|
|