× 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.


  • Subject: Re: FMTDTA Vs OPNQRYF..
  • From: cmassoglia@xxxxxxxxxxx (Charlie Massoglia)
  • Date: Tue, 27 May 1997 16:10:13 -0400

Rajee wrote:
>   In the application we are using there are many CLPs with FMTDTA. now we
>are planning to change all these instants by OPNQRYF statement. We donot
>know much about FMTDTA(..Especially the sort specifications used..). Can
>anybody let us know how to go about with it.
>
>Thanx in advance.
>
>Rajee thomas 
>Ambarish R. Bagali.
>Sriven Computer Soln.
>Hyderabad - India
>
FMTDTA is a character based sort.  Hopefully the following will help:

HSORTA or HSORTR
  This header spec indicates the total number of characrers upon which the
sort is to be done, the size of the output file, and other information.  It
would not be converted to an OPNQRYF.

HSORTRS
  This is a summary sort.  Only a single record is output for the
combination of FNC's.  You can also accumulate a field.  If you have any of
these, ask further because while they are powerful, they are very
complicated.  OPNQRYF has a similar function.

I C   1   6EQC960601
  Include records with the field in positions 1-6 equal to 960601.  Code
this in the QRYSLT parameter in OPNQRYF.

O C 256 256NEC 
  Omit records with the field in positions 256-256 non-blank.  Code this in
the QRYSLT parameter in OPNQRYF.

I P
O P
  Treat the field as a packed field for record selection.

I Z
O Z
  Only use the zone portion of the field when comparing for record selection.

I D
O D
  Only use the digit portion of the field when comparing for record selection.

FNC  31  60
FNC   7  11
   Sort the records in ascending sequence first by the field in positions
31-60 and in ascending sequence second by the field in positions 7 11.  Code
the two fields in the KEYFLD parameter in OPNQRYF.

FNC  31  60
FOC   7  11
   Sort the records in ascending sequence (FNC) first by the field in
positions 31-60 and in descending sequence (FOC) second by the field in
positions 7 11.  Code the two fields in the KEYFLD parameter in OPNQRYF.

FNZ
  Only use the zone portion of the field for sorting.

FND
  Only use the digit portion of the field for sorting.

FNP
  Treat the field as a packed field for sorting.

FDC   1 128
   Put in the output file the fields in positions 1-128.  Since OPNQRYF
permits you to access the file using an access path, you would not convert
this statement at all.

Hope this helps.


Charlie Massoglia, Massoglia Technical Consulting, Inc.
PO Box 1065, Okemos, MI 48854, USA
517-676-9700  Fax: 517-676-1006  EMAIL: cmassoglia@voyager.net


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.