Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort to generate a report

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sort to generate a report
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 22, 2010 12:56 pm    Post subject:
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    Post subject: Reply to: Sort
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: 6968
Location: porcelain throne

PostPosted: Tue Jun 22, 2010 1:11 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 22, 2010 1:12 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Jun 22, 2010 7:58 pm    Post subject:
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 Moderator


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

PostPosted: Tue Jun 22, 2010 9:58 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us