Focal Point
DOS command - how to capture feedback

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1051086372

February 27, 2008, 04:57 PM
Francis Mariani
DOS command - how to capture feedback
I run a DOS command in a fex:

DOS Xcopy &BACK_SOURCE1.EVAL &BACK_DEST1.EVAL /d:&BACK_DATE.EVAL /q /i /s /y


I can test the execution of this command via the &IORETURN DM variable. Is there any other feedback I can capture, for instance, the number of files copied by the Xcopy command?

Thanks,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 27, 2008, 05:17 PM
GinnyJakes
Does the xcopy produce output? If yes, can you pipe the output (using >) to a file?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
February 27, 2008, 05:45 PM
Francis Mariani
Ginny, thanks for that! Works well.

DOS XCOPY C:\IBI\APPS\B200 C:\IBI\_backup\apps\b200 /q /i /s /y >c:\ibi\_backup\result.txt

I have another little problem. It appears that &IORETURN is not valid in a fex run in Report Caster?

Thanks,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 27, 2008, 05:53 PM
Francis Mariani
My mistake! I should be using &RETOCDE and not &IORETURN.

Thanks,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 28, 2008, 04:39 AM
Baillecl
What I'd try :
1) Redirect the Dos Messages to a File
( Redirect is ">Dos filename" if I remember
2) With DM, take profit of the file
In any case) Beware of synchronising Tools that live in different Time-Spaces
Focusly yours


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
February 28, 2008, 04:45 AM
Baillecl
Well, i'm living in a different Space time, too !
Happy to see that I was not hundred miles out of the solution (And Thank you for the correct Word : PIPE)
Sorry that I arrive when the war is over (a French habit ?)
Could the Focus Community unify the World time so that everybody runs with the same chance
Focusly (and next time, it'll be seriously)


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
February 28, 2008, 09:20 AM
GinnyJakes
Francis,

You are most welcome! I do this stuff in Unix-land all the time, doing reports on directory listings etc.

B,

You are sooo funny. My ancestors are from France (Normandy). Actually 'pipe' is the Unix term for taking output of one command and using it as input to another. The symbol is the vertical bar (|), hence the name pipe. Maybe the more correct term is redirect for the >.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
February 28, 2008, 10:59 AM
ira
Giny, Bail - you are right on the mark(s). You can pipe, reroute, redirect to a file and do a -read against this file. and route accordingly with your results. c'est la vie

cos copy abc.mas xyz.mas > testfile.dat
filedef against it if need be
and -read against the vars.

Ira
aix 5333 wf 538


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
February 28, 2008, 12:15 PM
GinnyJakes
And, if the file has multiple lines, you can define a LINE80 master, do GETOKs and SUBSTRs etc., i.e. parse the snot out out it, and do reports. Do it all the time.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google