How to format a flat file using customised FMTSRC

130 pts.
Tags:
AS/400
AS/400 flat file
DDS
FMTDTA
Hi, I have a falt file.i want to sort it using a customised format source file.Please tell me how to create a source file for formatting the flat-file.I want the sample of a DDS of sort.

Software/Hardware used:
as400
ASKED: October 6, 2010  6:22 AM
UPDATED: October 6, 2010  11:36 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

first you need to create a source member to store the sort soecs.
We use QFMTSRC
here is the contents of a member ACHSRC and the FMTDTA command from the CL program.

<pre>
HSORTR 29A X
FNC 95 113
FNC 124 133
FDC 1 133

FMTDTA INFILE((*LIBL/ACHNEW)) OUTFILE(*LIBL/ACHNEW) +
SRCMBR(ACHSRC) OPTION(*NOPRT *NOSECLVL)</pre>

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    At the moment, I can't find a decent link to describe source statements for the Sort (FMTDTA) command. The best that I can find is in SEU help text. Create a source member with type SRT, SRT38 or SRT36. Each one has different SEU line prompts, but they all tend to work out the same. When you start a SEU edit session over the source member, type "IP?" in the sequence number field to request a list of valid input prompt types.
    • A SRT member shows 'REFORMAT/SORT' prompts of RH,RR,RFand RC.
    • A SRT38 member shows 'REFORMAT' prompts of RH,RR and RF.
    • A SRT36 member shows 'SORT' prompts of SH,SR,SC and SF.
    Choose each of the prompt types for the type of member that you created. When the prompt is displayed in the SEU edit window, press <F1> to see the help for each field in that specification type. Press <F2> to see the extended help for the entire specification type. Press <F14> to print a copy of the help that is being displayed. By printing the extended help for all of the prompt types, you will have a simple set of documentation. That all I can give unless I can track down the old manuals on-line. Tom
    125,585 pointsBadges:
    report
  • MurrayInfoSys
    Try this:
      publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0918260.pdf
    The other Phil
    940 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following