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

Sort to generate a report


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Tue Jun 22, 2010 12:45 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 22, 2010 12:56 pm
Reply with quote

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
View user's profile Send private message
kumar1234

New User


Joined: 06 Nov 2007
Posts: 84
Location: bangalore

PostPosted: Tue Jun 22, 2010 1:06 pm
Reply with quote

It is the Jcl sort...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jun 22, 2010 1:11 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 22, 2010 1:12 pm
Reply with quote

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
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Tue Jun 22, 2010 2:34 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 22, 2010 7:58 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jun 22, 2010 9:58 pm
Reply with quote

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
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Wed Jun 23, 2010 10:35 am
Reply with quote

Dick, I will take it in my future post
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top