View previous topic :: View next topic
|
Author |
Message |
kumar1234
New User
Joined: 06 Nov 2007 Posts: 84 Location: bangalore
|
|
|
|
Hi,
I have a requirement where in the input file there are many fields and I have to generate a report with only the fields as shown below:-
Claim No
Amt Paid
Paid date
Date of service - which is the header record in the input file.
Could anyone suggest me the syntax to do this.
Thank You.
Kumar. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Unfortunately today is not psychic day.
Have a nice ponder about the information that you think that we might need to be of any assistance to you. Then post it here and if you have given enough information we might be able to help.
Also, which sort product are you using and what is the release level. |
|
Back to top |
|
|
kumar1234
New User
Joined: 06 Nov 2007 Posts: 84 Location: bangalore
|
|
|
|
It is the Jcl sort... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Kumar,
suggest that you go to the dfsort forum and jcl forum
and browse thru at least 10 - 12 threads in each.
from that, you should get an idea of what information a Thread Starter should supply,
if he/she wishes anything in the way of help.
expat,
i think it is psychic day. I could have told you what his response to your post would be. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I am sure that you mean sort in batch, but whatever .......
Please review the amounr of useful information that you have given in your original post. Think about the the things that we will need to know to be able to help you. Maybe the positions, lengths and formats of the input fields. The RECFM and LRECL of the input file. What is the expected output for the report. You mentioned getting data from the header - where from in the header.
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 |
|
|
Back to top |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
Split the header file data file and the trailer file and then use outrec to get the desired fields as you want and finally merge the file to get your report,
Provide more information as the format of the file and the other detail while asking question/query |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Posting "solutions" is premature when the requirement is not properly defined. . .
Regardless of the requirement, there should be no need to split the file into pieces. . .
Maybe a proper definition will be posted. . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Kumar,
Please show an example of the 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 |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
Dick, I will take it in my future post |
|
Back to top |
|
|
|