[U2] [UD 7.1] [Solaris 9]

2007-08-10 Thread Moderator
REPOSTED FOR NON-MEMBER ADDRESS: <[EMAIL PROTECTED]>

Hi,
Are there any NFA users out there that can help me with an issue? 
I 'd like to copy 10 files from our production server to our test server. The 
problem is that NFA doesn't allow me to use the ECL command COPY. I don't want 
to run through every file copying record by record since that will take some 
time and it's not a neat solution. We are also implementing RFS so we can't use 
unix copy. Does anyone have a way to solve this I'd be glad.

TIA

Bjvrn Eklund
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


SV: [U2] [UD 7.1] [Solaris 9]

2007-08-10 Thread bjorn.eklund
Thanks Tim and Brian,
We will have to go with the copy record by record as it seems.

Bjvrn Eklund 


-Ursprungligt meddelande-
Fren: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Timothy Snyder
Skickat: den 9 augusti 2007 16:32
Till: u2-users@listserver.u2ug.org
Dmne: Re: [U2] [UD 7.1] [Solaris 9]


> I 'd like to
> copy 10 files from our production server to our test server. The problem 
is
> that NFA doesn't allow me to use the ECL command COPY

I've seen NFA users write their own copy utilities in UniBasic.  It really 
isn't any less efficient than the COPY command, since your bottleneck will 
be on the network more than anything you're doing on the hosts.  I 
envision a cataloged program called something like NFA.COPY that can take 
the same command-line parameters as the standard COPY command.  Naturally, 
you could work off of saved lists, and all of that good stuff.


> We are also implementing RFS so we can't use unix copy.

And you're right about recoverable files under RFS - please don't copy 
them at the UNIX level!  :-)  Actually, I'm not a fan of using O/S 
commands to copy database files unless it's done in a very controlled 
fashion.  And even then...

Tim Snyder
Consulting I/T Specialist
U2 Lab Services
Information Management, IBM Software Group
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UD 7.1] [Solaris 9]

2007-08-09 Thread Timothy Snyder
> I 'd like to
> copy 10 files from our production server to our test server. The problem 
is
> that NFA doesn't allow me to use the ECL command COPY

I've seen NFA users write their own copy utilities in UniBasic.  It really 
isn't any less efficient than the COPY command, since your bottleneck will 
be on the network more than anything you're doing on the hosts.  I 
envision a cataloged program called something like NFA.COPY that can take 
the same command-line parameters as the standard COPY command.  Naturally, 
you could work off of saved lists, and all of that good stuff.


> We are also implementing RFS so we can't use unix copy.

And you're right about recoverable files under RFS - please don't copy 
them at the UNIX level!  :-)  Actually, I'm not a fan of using O/S 
commands to copy database files unless it's done in a very controlled 
fashion.  And even then...

Tim Snyder
Consulting I/T Specialist
U2 Lab Services
Information Management, IBM Software Group
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2][UD 7.1][Solaris 9]

2007-08-09 Thread Brian Leach
   Bjvrn,

   Would a simple UniObjects/VBscript do the job? It could connect to both
   servers and act as a quick and dirty shuttle.

   Something along the lines of :

   Dim sess1,sess2
   Dim HostName1,UserName1,AccountPath1,Password1,FileName1
   Dim HostName2,UserName2,AccountPath2,Password2,FileName2

  HostName1 = "localhost"
  UserName1 = "administrator"
  AccountPath1 = "wychbooks"
  Password1 = InputBox("Password for " & UserName1 & " on " & HostName1)
  FileName1 = "BOOK_SALES"
  IsUniData = False

  HostName2 = "localhost"
  UserName2 = "administrator"
  AccountPath2 = "pick"
  Password2 = InputBox("Password for " & UserName2 & " on " & HostName2)
  FileName2 = "TESTFILE"

   If DoConnections() = False Then
  Msgbox "Could not connect"
   Else
  Msgbox "Connected to server"
  DoCopyFile
   End If

   Function DoConnections()

  If CreateSessions() = False Then
 Msgbox "Could not create sessions"
 DoConnections = False
 Exit Function
  End If

  sess1.HostName = HostName1
  sess1.UserName = UserName1
  sess1.AccountPath = AccountPath1
  sess1.Password = Password1
  If IsUniData Then
 sess1.DatabaseType = 2
  End If

  sess1.Connect
  If sess1.Error <> False Then
 Msgbox "Error returned from connect = " & sess1.Error
 DoConnections = False
 Exit Function
  End If

  sess2.HostName = HostName2
  sess2.UserName = UserName2
  sess2.AccountPath = AccountPath2
  sess2.Password = Password2
  If IsUniData Then
 sess2.DatabaseType = 2
  End If

  sess2.Connect
  If sess2.Error <> False Then
 Msgbox "Error returned from connect = " & sess2.Error
 DoConnections = False
 Exit Function
  End If

  DoConnections = True

   End Function

   Function DoCopyFile()
  Dim SourceFL
  Dim TargetFL
  Dim SL

  On Error Resume Next
  Err = False
  Set SourceFL = Sess1.OpenFile(FileName1)
  If (Err <> False) Or (SourceFL IS Nothing) Then
 Msgbox "Could not open " & FileName1
 Exit Function
  End If
  Set TargetFL = Sess2.OpenFile(FileName2)
  If (Err <> False) Or (TargetFL IS Nothing) Then
 Msgbox "Could not open " & FileName2
 Exit Function
  End If
  Set SL = Sess1.SelectList(0)
  SL.Select(SourceFL)
  Do
 SourceFL.RecordId = SL.Next
 SourceFL.Read
 TargetFL.RecordId = SourceFL.RecordId
 TargetFL.Record = SourceFL.Record
 TargetFL.Write
  Loop Until SL.LastRecordRead

  Msgbox "Copy completed"
  DoCopyFile = True

   End Function

   (Dump into notepad, save with a VBS extension and run using CSCRIPT or
   WSCRIPT).

   Brian
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UD 7.1] [Solaris 9]

2007-08-09 Thread bjorn.eklund
Hi,
are there any NFA users out there that can help me with an issue? I 'd like to
copy 10 files from our production server to our test server. The problem is
that NFA doesn't allow me to use the ECL command COPY. I don't want to run
through every file copying record by record since that will take some time and
it's not a neat solution. We are also implementing RFS so we can't use unix
copy. Does anyone have a way to solve this I'd be glad.

TIA

Bjvrn Eklund
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/