Quantcast
Channel: Net Express / Server Express - Forum - Recent Threads
Viewing all 375 articles
Browse latest View live

RE: ClpBoard

$
0
0

The following is an example of how this can be done using the Windows Clipboard API functions.

       id division.
       program-id.   testclip.
       special-names.
          call-convention 74 is winapi.
       working-storage section.
       78 GMEM-MOVEABLE                value 2.
       78 CF-TEXT                      value 1.
       01 hWndNewOwner pic x(4) comp-5 value zeroes.
       01 retCode      pic x(4) comp-5 value zeroes.
       01 any-key      pic x.
       01 myHandle     pointer.
       01 myPointer    pointer.
       linkage section.
       01 datatocopy   pic x(30).
       procedure division.

           call winapi "GlobalAlloc"
             using by value GMEM-MOVEABLE
                    by value length of datatocopy
              returning myHandle
           end-call
           call winapi "GlobalLock"
              using by value myHandle
              returning myPointer
           end-call
           set address of datatocopy to myPointer
           move z"This is a test" to datatocopy  *> null terminate text
           call winapi "GetActiveWindow"
              returning hWndNewOwner
           end-call

           call winapi "OpenClipboard"
              using by value hWndNewOwner
              returning retCode
           end-call
           if retCode = 0
              display "error"
           else
              call winapi "EmptyClipboard"
              call winapi "SetClipboardData"
                 using by value CF-TEXT
                       by reference datatocopy
              end-call
              call winapi "CloseClipboard"
           end-if
           call winapi "GlobalUnlock"
              using by value myHandle
              returning retCode
           end-call
           call winapi "GlobalFree" using by value myHandle
           stop run.


RE: ClpBoard

$
0
0

Thank you. It works perfectly.  

But I thought just by replacing SetClipboardData by GetClipboardData I can inverse the process, but I suppose something else must also be changed?

ClpBoard

$
0
0

Is there a simple way with NETEXPRESS 5.1 (CALL, Function, or MOVE) to send info from a text based program to the Clipboard - memory?

Of course there is the possibility to use right button, Edit, mark, enter, but I am looking for a simpler procedure, where all accepted data is copied to the clipboard.  It is then up to the user to paste or not this info.in an other program.

thanks for any help

RE: ClpBoard

$
0
0

Here is a revised program that will read the clipboard after it sets it. You should immediately copy the returned data to a working-storage variable and then close the clipboard. Use only the copy of the data and not the returned data itself as this belongs to the clipboard and not the program. Also be aware that the clipboard can contain data other than text. The program below checks for that:

       id division.
       program-id.   testclip.
       special-names.
          call-convention 74 is winapi.
       working-storage section.
       78 GMEM-MOVEABLE                value 2.
       78 CF-TEXT                      value 1.
       01 hWndNewOwner pic x(4) comp-5 value zeroes.
       01 retCode      pic x(4) comp-5 value zeroes.
       01 any-key      pic x.
       01 myHandle     pointer.
       01 myPointer    pointer.
       01 sub1         pic 9(5) value zeroes.
       01 mywsdata     pic x(30) value spaces.
       linkage section.
       01 datatocopy   pic x(30).
       01 datatoget    pic x(30).
       procedure division.

           call winapi "GlobalAlloc"
             using by value GMEM-MOVEABLE
                    by value length of datatocopy
              returning myHandle
           end-call
           call winapi "GlobalLock"
              using by value myHandle
              returning myPointer
           end-call
           set address of datatocopy to myPointer
           move z"This is a test" to datatocopy  *> null terminate text
           call winapi "GetActiveWindow"
              returning hWndNewOwner
           end-call

           call winapi "OpenClipboard"
              using by value hWndNewOwner
              returning retCode
           end-call
           if retCode = 0
              display "error"
           else
              call winapi "EmptyClipboard"
              call winapi "SetClipboardData"
                 using by value CF-TEXT
                       by reference datatocopy
              end-call
              call winapi "CloseClipboard"
           end-if
           call winapi "GlobalUnlock"
              using by value myHandle
              returning retCode
           end-call
           call winapi "GlobalFree" using by value myHandle
           call winapi "OpenClipboard"
              using by value hWndNewOwner
              returning retCode
           end-call
           if retCode = 0
              display "error"
           else
              call winapi "GetClipboardData"
                 using by value CF-TEXT
                 returning myHandle
              end-call
              if myHandle = null
                 display "Clipboard data not text!"
              else
                 set address of datatoget to myHandle
                 perform varying sub1 from 1 by 1
                    until sub1 > length mywsdata
                    if datatoget(sub1:1) = x"00"
                       exit perform
                    end-if
                 end-perform
                 move datatoget(1:sub1 - 1) to mywsdata
                 display mywsdata
              end-if
              call winapi "CloseClipboard"
           end-if

           stop run.

RE: redirect sysout in mfsort

$
0
0

Hello drpereyra,

Welcome to the Micro Focus Community Forums. As mentioned in the Server Express 5.0 documentation on Mfsort , you can redirect the output file generated by Mfsort by defining the SYSOUT environment variable.

• If you do not use the SYSOUT environment variable, it is written to a file named SYSOUT.

• If you do specify the SYSOUT environment variable, you specify the filename to be written to.

For future reference, you can find the Server Express 5.0 documentation at this link.

Then, on the left, look under the heading "Programming" and click on "File Handling". Chapter 8 in the File Handling book covers the Mfsort utility.

RE: redirect sysout in mfsort

$
0
0

Tanks Blair, I'm going to try it  and it comment you.

redirect sysout in mfsort

$
0
0

my work environment :

Solaris 9

Server Express 5.0 

my question is how to redirect the SYSOUT of mfsort to a file
I am confused if I change or enable OUTDD  on Solaris 9  (UNIX pseudo)
and where I should change it.

tanks

RE: Upgrade netexpress 5.0 to 5.1 from Windows XP to 7

$
0
0

Hi Shatty,

the handling of your Net Express license is independent from your Windows version.

So, install Net Express 5.1 on the new computer in this way:

At first Wrappack 6 (full installation) and after that Wrappack 8 if you wish, but better the latest Wrappack 13.

Explanation: Wrappacks are cumulative and include the contents of the previous Wrappacks.

Handling of your license in few words:

You have to free your old computer from the Net Express license, that's generate a Revoke Key. Very important: make a note of this Revoke Key! On the new computer you have to generate a Request Key. Login to the Micro Focus Supportline website and with both Keys you can request Micro Focus to send you a new licence key. choose: De-Activate / Activate my Product ( Revoke / Request Keys )

You will get a email with the new key and enter it on the new computer.

For a full description have a look at:

supportline.microfocus.com/.../revokerequest_help.asp

Regards, Torsten


RE: Upgrade netexpress 5.0 to 5.1 from Windows XP to 7

$
0
0

Hi  Torsten,

Thanks for reply, Really I don't want to use Revoke,, I restricted to use Retain,,, this means my license must be still in my PC,, that's why I mentioned 2 methods in my previous post

Upgrade netexpress 5.0 to 5.1 from Windows XP to 7

$
0
0

Hi, 

I've Netexpress VER 5.105.0076 installed on Pc running Windows XP service pack 3.

I'm planning to:

  • Upgrade Windows XP to Windows 7.
  • Upgrade Netexpress ver 5.105.0076 to 5.1 ver 5.108.0030

I need to RETAIN Netexpress ver 5.0  from my pc to keep the license, but to upgrade from Windows XP to Windows 7 cannot be done according to Microsoft rules.

Therefore I have 2 methods to do that:

  • Method 1 :
    • Using Windows Easy Transfer  for XP to transfer settings and others from Windows XP  to Windows 7
    • Install New Fresh Windows 7 ((formatting the HDD))
    • Use Windows7  Easy Transfer  to get  that settings and others, here Netexpress  5.0 license  should be within these settings !!??

 

  • Method 2 :
    • Upgrade from Windows XP to Vista
    • Upgrade from Windows Vista to Windows 7

Then I will install the following:

NXP325.106.0079.exe ((Wrappack 6)): the complete installation

NXP325.107.0047.msp ((Wrappack 7)): to update the previous installation

NXP325.108.0030.msp ((Wrappack 8)): to update the previous installation.

 

Kindly which is the best and saved method which will not damage my Netexpress License?

 

 

Net Express 5.1 license is not setup correctly

$
0
0

Hello,

I upgrade my PC from Windows XP to Windows 7, also I upgrade  my Net Express 5.0   to 5.1, with WrapPack #06 #07 #08,, I’ve used RETAIN to keep my License.

When the upgrades completed the product is licensed to the correct person and correct company, but Serial Number and Works Order Number not shown, they're “BLANK”.

In the License Management System Configuration the License status = Net Express Full license.

Next day I surprised the license is corrupted, I check the License Management System Configuration I found the license is not setup correctly, when I close the License Management System Configuration and I go back to Net Express I found the license is OK, and in the License Management System Configuration status = Full license.

I don’t know what causes this error and I’m afraid it may occur again, anyone can help.

RE: HomeBanking

$
0
0

Hi Pedro,

I have never seen this error but it appears to be coming from Oracle and not COBOL so I would suggest that you check the Oracle forums. At what point do you receive this error in your program?

HomeBanking

$
0
0

Dear Chris,

Do you have Idea about this error ...??

bind 34: dty=96 mxl=255(255) mal=00 scl=00 pre=00 oacflg=00 oacfl2=1 size=0 offset=792 bfp=1103c0690 bln=255 avl=255 flg=01 value="ORA-20000: (M)NO EXISTE USUARIO DISPONIBLE PARA ESTE CANAL(C)20509 " BINDS #5:

text file code page

$
0
0

Hello,

in Micro Focus COBOL I am creating a text file. File is defined like this:

select bankd-file assign to f-bankd-file
file status is wx-fstat
organization sequential.

fd bankd-file.
****************
01 bankd-rec pic x(01).

After that I do standard open output bankd-file and write


Is there any possibility to setup code page for file? It's created in utf8 (I think by default) but I importing this file to environment which needs this file in cp1251.

Or is there some easy way to convert file encoding? I can't use any third party solution. It must all be done in COBOL (or some Windows system command line routine).

Thanks for any help.

RE: Return value for CALL "SYSTEM"

$
0
0

When you call SYSTEM you are starting a new process which then executes the command that you are passing. The return-code returned is simply whether or not that command was executed and is not the return value from the command itself.

If you want to get dir listing information directly into your program then I would recommend that you use the library routines CBL_DIR_SCAN_START, CBL_DIR_SCAN_READ and CBL_DIR_SCAN_END,

There is an example for this in the docs and also another small example in the article here:


Return value for CALL "SYSTEM"

$
0
0

Hello,

please I am using commnad 

CALL "SYSTEM" USING W-CMD-LINE

where in W-CMD-LINE is for example DIR commnad

Is there any possibility to get return value from CALL "SYSTEM" ? To get DIR command output directly to COBOL?

Now I have to do: 'DIR > out.txt'  and then read this file in my program.

RE: Net Express 5.1 license is not setup correctly

$
0
0

The Serial Number and Work Order Number are only populated if you entered them during the original product installation and these are optional fields.

If you continue to experience the license corruption you describe here please open up an incident with Customer Care and we will assist you.

Thanks.

RE: Net Express 5.1 license is not setup correctly

$
0
0

Thanks Chris for reply

really  it happened many times, I Repair the Net Express 2 times, it's unlogic but to seems to be the problem solved,, I hope so

RE: MF system routine is missing

$
0
0

The CBL_DIR_SCAN library routines were added in Net Express 4.0 and higher so they do not exist in NX 3.1. To scan a directories contents in NX 3.1 you should use the call by number routine X'91' function 69 which is documented here.

RE: MF system routine is missing

Viewing all 375 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>