AS/400 SFTP causes one position shift of data in send file

40 pts.
Tags:
AS/400 FTP
AS/400 Subfiles
Oracle
SFTP
Hi Friends,I got a problem.I am copying data from flat file to path and sending on SFTP. after reaching the file oracle, first record loading fine into oralce, but from second record onwards, data shifting to right by 1 postion . 

Could you please suggest.

Thanks in Advance.

 

 



Software/Hardware used:
Software

Answer Wiki

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

There are two (for want of a better word) modes in which to transfer – or, two STRUCTures. Record or File mode.

on the iSeries, start an FTP session, and run the command STRUCT without any parms. This reports back the current setting.
I would try to flip the mode and see if this helped

So, if currently in File more, you can STRUCT R to flip it, or if currently in record mode, then a STRUCT F might help.

Not sure if this would help, but it is a starting point.

regards
kmh

Discuss This Question: 6  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
    I am copying data from flat file to path... How are you copying it? Show us the command or program code that did the copying. ...and sending on SFTP. Sending to what? What kind of system? Unix? Windows? AS/400? Mainframe? I would first look at what you chose for a record delimiter. The first thing that comes to mind is that you used a Carriage-return/line-feed combination, but the receiving system only reacts to newlines (line-feeds). Maybe other possibilities will come to mind if we know what is being done. Tom
    125,585 pointsBadges:
    report
  • Text
    Hi Tom, Presently,We are doing an Enhancement, where we are sending files from AS/400 to Oracle through Unix Interface(SFTP). DATA FROM AS/400 DATA WHILE LOADING INTO ORACLE 1222 XXX 333333 XYZ1 444444 1222 XXX 333333 XYZ1 444444 3323 YYY 213333 XYZ1 231233 3323 YYY 213333 XYZ1 231233 2313 ZZZ 323233 XYZ1 231233 2313 ZZZ 323233 XYZ1 231233 Here, whats happening is after file received into oracle and during loading, first line loading in proper way, but when coming from second line onwards, data shifting by one position starts from YYY. This is because length of second field is 4, due to we filled with only 3, and left WITH one blank position(XXX/YYY/ZZZ), this blank causes shift of rest of the record by one position. (213333 XYZ1 231233) I would like to check with you, is unix causes such a cause while sending from system1 to System2 Thank you! Venkat
    40 pointsBadges:
    report
  • Text
    Hi Tom, Presently,We are doing an Enhancement, where we are sending files from AS/400 to Oracle through Unix Interface(SFTP). DATA FROM AS/400 DATA |||||| WHILE LOADING INTO ORACLE 1222 XXX 333333 XYZ1 444444 |||||| 1222 XXX 333333 XYZ1 444444 3323 YYY 213333 XYZ1 231233 |||||| 3323 YYY 213333 XYZ1 231233 2313 ZZZ 323233 XYZ1 231233 |||||| 2313 ZZZ 323233 XYZ1 231233 Here, whats happening is after file received into oracle and during loading, first line loading in proper way, but when coming from second line onwards, data shifting by one position starts from YYY. This is because length of second field is 4, due to we filled with only 3, and left WITH one blank position(XXX/YYY/ZZZ), this blank causes shift of rest of the record by one position. (213333 XYZ1 231233) I would like to check with you, is unix causes such a cause while sending from system1 to System2 Thank you! Venkat
    40 pointsBadges:
    report
  • Text
    Hi Tom, Presently,We are doing an Enhancement, where we are sending files from AS/400 to Oracle through Unix Interface(SFTP). DATA FROM AS/400-----------------||||||DATA WHILE LOADING INTO ORACLE 1222 XXX 333333 XYZ1 444444 ||||||1222 XXX||333333 XYZ1 444444 3323 YYY 213333 XYZ1 231233 ||||||3323 YYY|||213333 XYZ1 231233 2313 ZZZ 323233 XYZ1 231233 ||||||2313 ZZZ|||323233 XYZ1 231233 Here, whats happening is after file received into oracle and during loading, first line loading in proper way, but when coming from second line onwards, data shifting by one position starts from YYY. This is because length of second field is 4, due to we filled with only 3, and left WITH one blank position(XXX/YYY/ZZZ), this blank causes shift of rest of the record by one position. (213333 XYZ1 231233) I would like to check with you, is unix causes such a cause while sending from system1 to System2 Thank you! Venkat
    40 pointsBadges:
    report
  • TomLiotta
    To show spacing, paste your lines. Then select the pasted lines and click the {code} box at the top of the entry area:
    DATA FROM AS/400—————–||||||DATA WHILE LOADING INTO ORACLE
    1222 XXX 333333 XYZ1 444444 ||||||1222 XXX||333333 XYZ1 444444
    3323 YYY 213333 XYZ1 231233 ||||||3323 YYY|||213333 XYZ1 231233
    2313 ZZZ 323233 XYZ1 231233 ||||||2313 ZZZ|||323233 XYZ1 231233 
    Please use WRKLNK (or the DSPF command) to view the portion of the file that causes the problem. Select a portion of the first record and the second and third records to show part of a good line and a couple bad lines. You only need to show a block of characters from before and after the problem area. The section might look like this:
    ,"233719","TESTLF    ","T
    ,"233719","TESTLF    ","T
    ,"233719","TESTLF    ","T
    ,"233719","upddta2   ","T
    Then, while still viewing the file, press <F10=Display hex> so you can copy/paste a {code} block like:
    2C223233 33373139 222C2254 4553544C 46202020   ,"233719","TESTLF   
    2C223233 33373139 222C2254 4553544C 46202020   ,"233719","TESTLF   
    2C223233 33373139 222C2254 4553544C 46202020   ,"233719","TESTLF   
    2C223233 33373139 222C2275 70646474 61322020   ,"233719","upddta2  
    Finally, press <F10> to get back to character mode and press <F15=Services> to show the CCSID of the file. Paste the CCSID value back here. Something odd is going on. The data needs to be examined to be sure of some possibilities. Tom
    125,585 pointsBadges:
    report
  • Text
    [...] 8. Boykie and TomLiotta gave it their best shot trying to help figure out why AS/400 SFTP causes one position shift of data in send file. [...]
    0 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