Sort Condition For Writing Two Output Files

View Other Tips        Iphone Apps - Photo Effects Apps

  Main Question - Posted From Prem:
Please consider the below situation. Line 1 position 1 to 4 - will contain the price, e.g. 3.0 Line 1 position 11 to end - will contain the narrative PRICE PER SHARE Line 2 position 1 to 6 - will contain the narrative CUSIPS Line 3 position 1 to 9 - will contain the cusip number Line 3 position 11 to end - may contain part of the security name Question: I want to copy the first line contains price value in a separate file.I want to skip the scond line contains the caption 'Cusip'.I want to write the positions 1 to 9 from line 3 to till the Cusip value exists in another file.I would like to write two separate output files in a single SORT.Please provide me how should be the SORT condition is?

Guest Says:
I've never tried to do a scenario like that, but I think I would handle that with a program instead of sort. You could easily spend more time trying to create a sort to handle that where a program could be written and done in half that time.

RDin Says:
You may be able to use splice with icetool, splice allows you to combine multiple files but even that I'm not sure you can do what you listed above.

Frank Yaeger Says:
I suspect you can do what you want with DFSORT, but it's not clear from your description what you want to do exactly.  If you're using DFSORT and you want more help on this, post the following information and send me an e-mail offline ( to indicate you're posted:

Please show an example of the records in your 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 file.  Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

//SYSIN    DD    *

Frank Yaeger - DFSORT Development Team (IBM) -  
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration                                                        
DFSORT/MVS is on the Web at  

Add your reply below ...

This site allows you to ask questions and get answers from various posters, you may also answer any posts if you feel like you have input to give. Feel free to ask for help with any new question you wish, but most of the questions here are tech related. You will find many questions and answers related to your Ipod or Ipod Nano, Itunes, audio and video converting, spyware or adware cleanup, pc or other computer questions, and even mainframe questions. Although these are the tech questions most often asked, you will find help on almost any computer or software related subject. Feel free to go to the main menu and review the posts already present, or feel free to ask your own question. (Some questions will be closed once the moderator feels they are sufficiently answered and that no other input is needed).

See All Tips        Iphone Apps

Your Name:

Your Reply:

Type in verification code:

Main Menu

Shareware and Freeware Database

Tasks and Spyware Database

Various Computer Help Topics