Data Transfer in iseries

2480 pts.
Tags:
AS/400
IBM iSeries
iSeries Access
I am transferring a non keyed Physical File from an i5 to a .txt file on my PC.  Is there a way to force the resulting sequence of records in the .txt file on my PC to be the same as the Physical File on the i5 ?

The sequence is inconsistent, sometime the same, sometimes different.



Software/Hardware used:
iSeries Access for Windows V5R4M0 Service Level SI35287

Answer Wiki

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

On the iSeries Access for Windows dialog box, click on the “data options” button and enter a field in the “order by ” text box. If you don’t know the name of the field, you can click on the “details button” to get a list of the fields in the file you are using. Click on the “Order by” tab and select your sort field.

Discuss This Question: 7  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
    Please describe how you are "...transferring a non keyed Physical File from an i5 to a .txt file on my PC." FTP? iSeries Access File Transfer? CPYTOIMPF? Your own programming? Something else? Some transfer methods use SQL for example. With SQL, a sequence is never guaranteed without an ORDER BY clause. Or it might be something else entirely. Tom
    125,585 pointsBadges:
    report
  • wpoulin
    Tom, As described above I am using iSeries Access for Windows V5R4M0, Data File Transfer. Thank You, Bill
    2,480 pointsBadges:
    report
  • wpoulin
    Teandy, That is my problem, I don't have a field to sort on, I want the .txt file created on my PC in the same sequence as the PF I am doing a Data Transfer from. Thanks, Bill
    2,480 pointsBadges:
    report
  • Teandy
    What type of file are you transfering? Is it a flat file (A file that has only one field that contains the data)? Is it a flat file with delimiters between fields?
    5,860 pointsBadges:
    report
  • wpoulin
    Teandy, It is a flat file with only 1 field, 750 characters long, created thru DDS and compiled. No delimeters. Thanks, Bill
    2,480 pointsBadges:
    report
  • Teandy
    Try running the following command on you i5: CPYTOIMPF FROMFILE(My_Flat_File) + TOSTMF('/My_IFS_folder/My_Flat_File.TXT') + MBROPT(*REPLACE) STMFCODPAG(*PCASCII) + RCDDLM(*CRLF) DTAFMT(*FIXED) + STRDLM(*NONE) FLDDLM('|') This should create a text file on the IFS called My_Flat_File.txt in folder My_IFS_folder. You should then be able to map a drive to the IFS folder and pull the file down to your desktop. Once you have the file, see if it is in the order you want. The only other thing I can think of would be to create a new file with two fields. One field acts as the key for the file and the other holds the data from the flat file. Then read the flat file, pick a from and through position in the flat file field to act as the key and write the key and the data from the flat file to the new file. Then import the new file using iSeries Access for Windows.
    5,860 pointsBadges:
    report
  • TomLiotta
    Getting to the heart of the question, how do you know what the 'order' is on your iSeries? And is your "flat file" a program-described or externally-described file? (If you run DSPFD, is the "Externally described file" attribute 'Yes' or 'No'?) A reliable solution might require recreating your flat file. Tom
    125,585 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