Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FTP time stamp command?

292 views
Skip to first unread message

Jeff Wilson

unread,
Apr 8, 2004, 1:49:06 PM4/8/04
to
I am trying to determine a way that I can get a timestamp to appear in
my FTP outout script. When I try a SYSC DSPSYSVAL QTIME, a spool file
is created, but nothing shows up for it in the output script. How can
I get a timestamp in the actual text of the output script generated by
an FTP client session running in batch? Thanks very much in advance.

Jeff Wilson

Chris Bryan

unread,
Apr 8, 2004, 4:43:43 AM4/8/04
to
You could write a CL program that retrieves the current
date/time, and sends it as an *ESCAPE message to the
external program message queue, which would show up
in the joblog when you call the program interactively,
or in the FTP output file if you call it from your batch file.

"Jeff Wilson" <JeffW...@aol.com> wrote in message
news:72bf9d04.04040...@posting.google.com...

Drew Dekreon

unread,
Apr 8, 2004, 8:44:45 PM4/8/04
to
This programs always puts the date time stamp in, plus any comment (up
to 60 chars) in hilite attribute
file OUTPUT must be overridden to a srcpf member

example of use
test cl
dcl &user *char 10
RTVJOBA USER(&USER) TYPE(&TYPE)
ovrdbf input tofile(ftp) mbr(billzipI)
ovrdbf output tofile(ftp) mbr(billzipO)
FTPNOTE
ftp...
ftpnote 'Job Completed'


ftpnote cmd (calls ftpnoter)
cmd prompt('add note to ftp output')
PARM KWD(TEXT) TYPE(*CHAR) LEN(60) MIN(0) +
EXPR(*YES) CASE(*MIXED) CHOICE('Message +
to put in output') PROMPT('(opt.) Message')
ftpnoter
** Write a line to the FTP output file
** textline automatically starts with the current date/time
** file OUTPUT should be overridden to correct file/mbr before call!

Foutput o e disk rename(ftp:ftprec)
D Now s z
D test s 6s 0
c time now
c eval srcdta = %char(now)
** timestamp format: 2003-02-20-11.37.19.479000
** x'22 is highlight, x'20 is normal
c eval srcdta = x'22'
c + %subst(srcdta:6:6)
c + %subst(srcdta:6:6)
c + %subst(srcdta:1:4)
c + ' '
c + %subst(srcdta:12:8)
c + x'20'
** change 02-20-2003 11.37 into 02/20/2003 11:37
c '.-':':/' xlate srcdta srcdta
c if %parms = 1
C *entry plist
C parm message 60
c eval test = %len(message)
c eval test = %len(%trim(message))
c eval srcdta = %trim(srcdta)
c + %trim(message)
c endif
c write ftprec
c eval *inlr=*on

example of use
test cl
dcl &user *char 10
RTVJOBA USER(&USER) TYPE(&TYPE)
ovrdbf input tofile(ftp) mbr(billzipI)
ovrdbf output tofile(ftp) mbr(billzipO)
FTPNOTE &user

Jeff Wilson

unread,
Apr 9, 2004, 5:24:45 PM4/9/04
to
Drew

Thanks..a very nice idea. I was hoping for an actual FTP
command...something that I could insert in all of my scripts instead
of having to change code and recompile and restest all of my existing
programs. It's hard to believe that there isn't something that simple
in the FTP client, but I guess not. I saw another message from someone
who does a PUT of a temp file and then a DIR to see the time. Again, i
was hoping for a simple command. I think I am out of luck on this one.
Thanks again!

Jeff Wilson

0 new messages