ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Copy to remote server using SCP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Copy to remote server using SCP

    Hello all,

    i am trying to send a file using SCP from main server to remote server, but the result of the copy to remote server is not correct, below are the details
    i create the PF and then copy to streamfile using CPYTOIMPF, before sending it to the remote server

    CPYTOIMPF FROMFILE(QTEMP/TEST234) TOSTMF('/HOME/INO/TEST234.TXT') MBROPT(*ADD) STMFAUT(*INDIR) RCDDLM(*CRLF) DTAFMT(*FIXED)


    main server
    Browse : /home/ino/TEST234.TXT
    Record : 1 of 1 by 18 Column : 1 201 by 131
    Control :

    ....+....1....+....2....+....3....+....4....+....5 ....+....6....+....7....+....8....+....9....+....0 ....+....1....+....2....+....3.
    ************Beginning of data**************
    PERMATABANK
    ************End of Data********************

    remote server
    Browse : /home/mesin18/test3.txt
    Record : 1 of 2 by 18 Column : 1 200 by 131
    Control :

    ....+....1....+....2....+....3....+....4....+....5 ....+....6....+....7....+....8....+....9....+....0 ....+....1....+....2....+....3.
    ************Beginning of data**************
    ¤ § ¢£ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@
    %
    ************End of Data********************

    F3=Exit F10=Display Hex F12=Cancel F15=Services F16=Repeat find F19=Left F20=Right
    1 records folded.
    how can i get the data to be correct ?

    thanks for the help

  • #2
    try adding this parameter (STMFCODPAG(*PCASCII) ) to your cpyToImpF command

    Walt

    Comment

    Working...
    X