× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Murali,

start here:
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QBKAQ100/CCONTENTS?SHELF=QB3AYC05&DN=SC09-1826-00&DT=19940606151250

store your sourse specs in a source pf called QFMTSRC (or anything).

a simple example:

     HFILE     16A         X
     I C  15  16EQC10
     IOC  15  16EQC20
     FNC   1  16
     FDC   1 122

The above basically says:

from your input file, create a new file, 122 in length.
include in this file only records from the input file that contain a 10 or
a 20 in positions 15-16.
sort the file by positions 1 - 16 of the inputfile, and place in the output
file positions 1 - 122.

the specifications are fixed formatted, much like DDS and RPG.  Check the
ibm documentation for each spec type, position and meaning, but in brief:

the 'H' spec describes the job, and the size of the sort fields.

the 'I' spec specifies which records to include.

the 'F' specs describe fields to sort by, and to include in the output.

hope this helps,

rick
---original message--------
Iam new to this flat file concept...can any body tell me how to write
sort/select  conditions...Iam sorting data (iam nt using opnqryf)by using
FMTDTA and how to write sort conditions in the flat file   for that?how do
i
use this in CL pgm?

Regards,
Murali



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.