cl

pts.
Tags:
CL
CL programming
CPYTOIMPF
DCL &TEXTFILENM *CHAR 40 dcl &curdt *char 6 dcl &curtm *char 6 /* build your CL file name as */ RTVSYSVAL SYSVAL(QDATE) RTNVAR(&CURDT) RTVSYSVAL SYSVAL(QTime) RTNVAR(&CURTM) ChgVar &TextFileNm (QDATE *TCAT QTIME *TCAT ‘.TXT’ CPYTOIMPF … To stream file . . . . . . . . . TOSTMF &TextFileNm Am able to build a string into variable &textfilenm.When i use cpytoimpf and give &textfilenm in to stmf a file is getting created with string,but when i give a directory in th path as test/&textfilenm a text file by name &textfilenm is getting created instead of the string.

Answer Wiki

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

Hi,

You need to build the directory as a variable as well :-

CHGVAR VAR(&DIRNAM) VALUE(‘Test/’ *TCAT &TextFileNm)

Regards,

Martin Gilbert.

Discuss This Question:  

 
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

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