CPYTOIMPF problem

1015 pts.
Tags:
CPYTOIMPF
I am using command CPYTOIMPF to convert data from physical file to csv. In TOSTMF parameter of this command I want to pass dynamic folder name with dynamic file name like (/QDLS/&Folder/&File), but it takes hard coded string path like('/QDLS/MyFolder/MyFile.csv'). How to handle it. 

Thanks in advance

Answer Wiki

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

Discuss This Question: 5  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
  • pdraebel
    I think you will have to "construct" one variable for the PATH parameter (&PATH). Use a CHGVAR &PATH VALUE('/QDLS/' *tcat &FLR *TCAT '/' &FILE) to put the value in the &PATH variable.
    2,605 pointsBadges:
    report
  • hunshabbir7
    Thanks for reply...
    I have tested as you have suggested but it is giving me issue.
    "Operands must be
    numeric for parameter VALUE."

    I have declared parameter as:
    DCL VAR(&PATH) TYPE(*CHAR) LEN(50)
    CHGVAR &PATH VALUE('/QDLS/'*TCAT &USR *TCAT '/' &FILENAME).
    What could be the reason?
    1,015 pointsBadges:
    report
  • pdraebel
    Should it not be CHGVAR &PATH VALUE('/QDLS/'*TCAT &USR *TCAT '/' *TCAT &FILENAME).
    2,605 pointsBadges:
    report
  • hunshabbir7
    yes that was my mistake my assignment has been submitted. I made another variable with 1 character length and given it value '/' and concatenate it. Thanks for reply. 
    1,015 pointsBadges:
    report
  • Splat
    Why create a variable with the value of '/'?  
    6,995 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