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



The AS/400 command is FMTDTA (Format Data).  It uses the same sort
specifications that the mainframe uses.  It relies on the field positions
defined in the sort specifications, rather than the external field names
defined in the DB2/400 database file.  As long as you define your AS/400
files to EXACTLY match the layout of the files (field length, type, etc.)
that you are porting from the mainframe, it will work exactly the same on
the AS/400.

There are other ways to accomplish what you are trying to do, if you are
willing to make some application changes.  You could use OPNQRYF to create
the same type of summary data for input to your program, with little or no
change to the HLL program.  The OPNQRYF command can be executed prior to
executing your HLL program to build the summary work file just like you are
using Sort now.

I don't have a specific example immediately available to post right now, but
maybe someone else in the list will help out...


----- Original Message -----
From: "Tarun Goel , Gurgaon" <goelt@ggn.hcltech.com>
To: <midrange-l@midrange.com>
Sent: Monday, September 23, 2002 5:07 AM
Subject: AS/400 equivalent of Mainframes SORT utility


> Hi everybody,
>
> I'm working on a mainframe to AS/400 conversion project. My problem
> is related to finding an equivalent of SORT utility of mainframes on
AS/400.
> Has anybody worked on this earlier, please let me know. I'm looking for
> solutions for some specific features that the SORT utility has on
> mainframes. Just to let everybody know about it, you can define summation
> fields to SORT and it prevents overflow of such fields. To give an
example:
>
> Let's say my input file has following fields
>
> FLD1 FLD2 FLD3
> AAAA ZZZZ 1111
> AAAA ZZZZ 8888
> AAAA ZZZZ 2222
> AAAA ZZZZ 4444
>
> And I specify in SORT to sort by FLD1 and FLD2 and sum up field
> FLD3, the out put will have following data:
>
> FLD1 FLD2 FLD3
> AAAA ZZZZ 7777
> AAAA ZZZZ 8888
>
> See how it has added up FLD3 so as to prevent an overflow, though
> the o/p is not really a unique record the SORT would not abend and the sum
> field will also not be truncated. Can we generate similar output from
> AS/400? If not then, what could be the best approach, so that we don't
have
> to touch existing applications processing logic, and we feed the
processing
> programs the same kind on input?
>
> Thanks everybody, in anticipation.
>
> Regards,
> Tarun Goel
>
>
>
****************************************************************************
> ******************************************
> Disclaimer:
>
> This document is intended for transmission to the named recipient
> only.  If you are not that person, you should note that legal rights
reside
> in this document and you are not authorized to access, read, disclose,
copy,
> use or otherwise deal with it and any such actions are prohibited and may
be
> unlawful. The views expressed in this document are not necessarily those
of
> HCL Technologies Ltd. Notice is hereby given that no representation,
> contract or other binding obligation shall be created by this e-mail,
which
> must be interpreted accordingly. Any representations, contractual rights
or
> obligations shall be separately communicated in writing and signed in the
> original by a duly authorized officer of the relevant company.
>
>
>
****************************************************************************
> ******************************************
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.