ObjectScript

Syndicate content 30 

Hello gentlemen,

 

I have to create a objectscript program that will simulate a mainframe (because it's going to be removed). For my program, I receive data from another program that is written in Delphy by TCP on a preset socket.  Here is my problem, how can I handle this? 
Which class shoud my program  extend?
Which Adapter should I use?
My program must be able to read what the delphy one is sending and i don't really know what structure it is in what it is in. So is there a class that can allow me to read it? Thanks for your future anwers.
Here is a sample of what I have thought but doesn't work.

Last comment 7 days ago
0   0 3
0

answers

140

views

0

rating

Hello gentlemen,

here is my question: I would like to delete files one by one (not all at a time because I need to check somethinkg to delete it or not) in a defined folder but how can I handle it?  I have used the extension :

EnsLib.File.PassthroughService

But it only works when a file is moved in my folder... But I want to launch my program everyday (with a planifier) in the purpose to delete file that more that 2 months old. With "PassthroughService", it won't work since the the file is not moved so it won't go in my onProcessInput...

If you can offer me a solution, I'll take it :)
Here is a sample of my code

0   0 1
0

answers

0

comments

27

views

0

rating

First, my $ZVERSION:

Cache for OpenVMS/ALPHA V7.x (Alpha) 2010.1.6 (Build 952_2 + Adhoc 17754) 3-JAN-2018 14:32:54.07

Second, my issue:

I believe my current villain is “incremental compiling.” I was able to compare early compile output with later compile output:

Compilation started on 04/10/2019 10:46:32 with qualifiers 'cuk'
Compiling class UnitTests.Task3496 incremental compile detected
Compiling routine UnitTests.Task3496.2
Compilation finished successfully in 0.800s.

... several compiles later...

Compilation started on 04/10/2019 13:35:33 with qualifiers 'cuk'
Compiling class UnitTests.Task3496
Compiling routine UnitTests.Task3496.1
Compilation finished successfully in 0.999s.

The problem that I am having today is that the %STACK is showing my code executing code that has been commented out

0   0 0
0

answers

0

comments

25

views

0

rating

Hello everybody,

My question would be, how is the recommended way to access Windows shares, also in view of future demads. Of course, I'm also happy about an explanation or code snippet of how the library, which is mentioned in the following , can be used under cache.

The classic jcifs library is easy to use, also with Cache, but as microsoft ceases support for smb1, we are currently looking for alternatives. jcifs-ng is such a library, which we took a closer look at. In java code a jcifs-ng file operation looks like this:

[...]
CIFSContext baseCtx = new BaseContext(new PropertyConfiguration(System.getProperties()));
NtlmPasswordAuthenticator creds = new NtlmPasswordAuthenticator(smbDomain,smbUser,smbPass);
CIFSContext ct = baseCtx.withCredentials(creds);
SmbResource sr = ct.get(smbConnect);

// do something with the SmbRessource which can be either a file or a directory
[...

Last comment 12 February 2019
0   0 2
0

answers

75

views

0

rating

Dear community!

What do you think about webinar "Declarative programming on COS"? I want to do such one.

I am going to tell about main points of declarative programming and how you can implement it in your real projects.

Please feel free to write your opinion here.

Please if you wish to become a member of such webinar write me a message to atygaev.mi@gmail.com with subject "webinar".

Last comment 23 November 2017
0   0 2
0

answers

125

views

0

rating

I am trying to balance a query using a SQL Inbound Adapter against the output of Ensemble. I am finding that a couple of records here and there are missing in the output file. 

Most of our queries are based of of views which may or may not have a unique key.

So If you don't have a Delete Query in your settings and Key Field Name is blank, it is possible that some records may or may not make it through to your endpoint?

Thanks

Scott Roth

Integration - Interfaces

The Ohio State University Wexner Medical Center

0   0 1
0

answers

0

comments

138

views

0

rating

Hi, 
I've organized my repository using TortoiseSVN. I was careful to use only svn commands while creating my file structure. Now all Subversion commands are working at the command line but not from within my IDE (Cache Studio). Basically I'm trying to write a plug-in for my IDE to use Subversion from within the Studio. Trying to integrate Subversion into my IDE, something like Subclipse, but for Cache Studio.  The error occurred after reorganizing my code into directories. For example at the command-line, svn info and svn status and all other commands work perfectly.  All Subversion commands work at the command prompt!

Last comment 10 March 2017
0   0 1
0

answers

493

views

0

rating

How can I prevent large number truncation when using the DynamicObject and DynamicArray classes to create JSON in objectscript and then parsing the result in javascript. Are there any global settings that configure the output when using these classes?

 

I am looking at converting to the new DynamicObject and DynamicArray classes to build JSON. Our current (homegrown) JSON library forces string representation of numbers too long because of errors we were seeing with long numbers being truncated on the client, I am hoping to accomplish the same with the new classes.

 

USER>set longNum = 1234567890123456789
 
USER>w longNum
1234567890123456789   //valid cache  number, 19 digits
USER>s arr = [(longNum)]  
 
USER>w arr.%ToJSON()
[1234567890123456789]   //Valid JSON, however I would like this to be a quoted string so it can be parsed in javascript

//Parsed in javascrip

Last comment 9 December 2016
0   0 3
0

answers

414

views

0

rating

I have the following problem:

  • There are several classes with method generators, which needs to be compiled during every compilation
  • I have "ckub" qualifiers enabled in studio
  • I don't want to remove "u" qualifier because I need it very much in another namespaces

So how do I force classes with method generators to recompile when "u" qualifier is present?

Last comment 15 July 2016
0   0 2
0

answers

502

views

0

rating

This morning on the old Caché Google Group, someone posed the following question, which I've decided to answer here, because it's interesting!

Is there a way to iterate ClassMethod's params, and get param's names and values?

The first answer I can come up with is: it's not easy! In any method, you could try to write code like this (where methodName is the name of your method)

Last comment 18 February 2016
+ 6   0 3
0

answers

705

views

+ 6

rating

XData blocks in Caché classes has a MimeType property, and dcoumentation says

MimeType — The MIME type (more formally, the internet media type) of the contents of the XData block. The default is text/xml

But unfortunately I can't set any other values, such as text/html or application/javascript, because XData still expect only XML. 

So, question is, for what reasons this property was appeared?

It would be very usefull to set in this property anything other then text/xml, and Studio would highlighted it as developer expected.

Last comment 18 February 2016
+ 3   0 4
0

answers

144

views

+ 3

rating

I've searched the ObjectScript reference for any instances of Upper, Lower or Case and the only thing is a case/switch statement.  In all the documentation I can only find SQL and Cache Basic references for things like UCASE.

So how do I do this in ObjectScript?

 

For instance,  if (ucase(dtype)="G") { }

Last comment 8 February 2016
0   0 4
0

answers

127

views

0

rating