More 4GL help Blank Title 105274

Ok, I got it.

Define variable OutputName as character no-undo.
Define variable dttime as character no-undo.
Assign dttime = String(Today,"999999") + "-" + Replace(String(TIME,"HH:MM:SS"),":","").
Assign OutputName = "\\TAIT-APP04\NewPODtlAttch_TT$\ " + DCD-USERID.
OUTPUT TO Value(OutputName + dttime + ".csv").

Thanks everyone for the help.



________________________________
From: Christopher Heins <cheins@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Monday, November 7, 2011 2:45 PM
Subject: [Vantage] Re: More 4GL help

You can build any character expression you like but you need to use OUTPUT TO VALUE(expression) ... else it tries to interpret the expression literally as a filename.

Here's an example, when I create a BarTender Commander script file ... definitions not shown ...

vcPathname = "\\erp-apmepm\bartender\".

        if first-of (ttbt.zone) then do:
                vcPrefix = string(ttbt.wavenum) + "_" + string(ttbt.zone) + "_".
                vcRootName = vcPrefix + String(Today,"999999") + "-" + Replace(String(TIME,"HH:MM:SS"),":","").
                vcScriptName = vcPathname + "inbound\" + vcRootName + ".bt".
                OUTPUT stream s-script TO Value(vcScriptName).
        end.

Cheers!

Christopher Heins
Sr. Progress Programmer/Analyst
[cid:image001.png@01CC9D5A.F9DA9110]
Desk# 973-560-5370
 Cell# 908-256-3662
Skype: cheins.nj
cheins@...<mailto:cheins@...>


________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.

This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
Has anyone used a variable or anything as part of a filename. This works fine, output to "\\Server\NewPODtlAttch_TT$\test.csv". but I need the filename to be unique. I would like to use the username plus a date and time to make it as unique as possible. I have tried output to "\\TAIT-APP04\NewPODtlAttch_TT$" + DCD-USERID + ".csv". to start but I get an error saying Invalid input/output option. Anyone have any ideas?

Thanks,

Ted
Try this:



Define variable OutputName as character no-undo.

Assign OutputName = to "\\TAIT-APP04\NewPODtlAttch_TT$" + DCD-USERID +
".csv".

Output to value(OutputName).



That should work. Also, I suggest you append "STRING(TODAY) + STRING(TIME)"
to any file name, that gives it the time stamp of the day, and will help
with unique.



Hope that helps.



Kevin Simon

SimsTrak Consulting



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
tkoch77
Sent: Monday, November 07, 2011 2:12 PM
To: vantage@yahoogroups.com
Subject: [Vantage] More 4GL help





Has anyone used a variable or anything as part of a filename. This works
fine, output to "\\Server\NewPODtlAttch_TT$\test.csv". but I need the
filename to be unique. I would like to use the username plus a date and time
to make it as unique as possible. I have tried output to
"\\TAIT-APP04\NewPODtlAttch_TT$" + DCD-USERID + ".csv". to start but I get
an error saying Invalid input/output option. Anyone have any ideas?

Thanks,

Ted





[Non-text portions of this message have been removed]
You can build any character expression you like but you need to use OUTPUT TO VALUE(expression) ... else it tries to interpret the expression literally as a filename.

Here's an example, when I create a BarTender Commander script file ... definitions not shown ...

vcPathname = "\\erp-apmepm\bartender\".

if first-of (ttbt.zone) then do:
vcPrefix = string(ttbt.wavenum) + "_" + string(ttbt.zone) + "_".
vcRootName = vcPrefix + String(Today,"999999") + "-" + Replace(String(TIME,"HH:MM:SS"),":","").
vcScriptName = vcPathname + "inbound\" + vcRootName + ".bt".
OUTPUT stream s-script TO Value(vcScriptName).
end.

Cheers!

Christopher Heins
Sr. Progress Programmer/Analyst
[cid:image001.png@01CC9D5A.F9DA9110]
Desk# 973-560-5370
Cell# 908-256-3662
Skype: cheins.nj
cheins@...<mailto:cheins@...>


________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.

This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


[Non-text portions of this message have been removed]
I tried this and its not creating the file.

Define variable OutputName as character no-undo.
Define variable dttime as character no-undo.
Assign dttime = String(Today,"999999") + "-" + Replace(String(TIME,"HH:MM:SS"),":","").
Assign OutputName = "\\TAIT-APP04\NewPODtlAttch_TT$\ " + DCD-USERID + String(TODAY) + String(TIME) + ".csv".
OUTPUT TO Value(OutputName + dttime).

This however did work for me.

output to value('\\TAIT-APP04\NewPODtlAttch_TT$\ ' + DCD-USERIDÂ '.csv').




________________________________
From: Christopher Heins <cheins@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Monday, November 7, 2011 2:45 PM
Subject: [Vantage] Re: More 4GL help

You can build any character expression you like but you need to use OUTPUT TO VALUE(expression) ... else it tries to interpret the expression literally as a filename.

Here's an example, when I create a BarTender Commander script file ... definitions not shown ...

vcPathname = "\\erp-apmepm\bartender\".

        if first-of (ttbt.zone) then do:
                vcPrefix = string(ttbt.wavenum) + "_" + string(ttbt.zone) + "_".
                vcRootName = vcPrefix + String(Today,"999999") + "-" + Replace(String(TIME,"HH:MM:SS"),":","").
                vcScriptName = vcPathname + "inbound\" + vcRootName + ".bt".
                OUTPUT stream s-script TO Value(vcScriptName).
        end.

Cheers!

Christopher Heins
Sr. Progress Programmer/Analyst
[cid:image001.png@01CC9D5A.F9DA9110]
Desk# 973-560-5370
 Cell# 908-256-3662
Skype: cheins.nj
cheins@...<mailto:cheins@...>


________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.

This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]