I red the following article and it seems like I should be able to define a variable of type varying that's size limit will be 16mb instead of 65535 characters.
http://www.mcpressonline.com/programming/rpg/v6r1-rpg-enhancements.html
This forum post suggests that it is posible to do this in V6.1.
http://www.code400.com/forum/forum/iseries-programming-languages/rpg-rpgle/11426-character-string-max-length
D BigVarying S a Len(25000000) Varying(4)
When I try to implement this I get the following errors and it seems like I cannot use Len(25000000) Varying(4)
Maybe I don't understand what exactly is meant by V6.1 but I checked on the Green screen using the command DSPSFWRSC and get the following Release V6R1..
I also checked by using I systems navigator and I checked the servers properties and it is : i5/OS version Version 6 Release 1 Modification 0.
The IDE I use to compile is IBM Websphere development studio
Version: 7.0.0
Build id: 20070202_0030
Trying to compile a RPGLE function.
Am I checking the correct version or is there a RPG version and how do you check it.
can you please help me out of my confusion.
V6.1 is your operating system version and you can refer to the V6.1 ILE RPG Language Reference here to see if it's possible. I think what you're looking for is on page 185.
I've just tested this in 7.2 and I am not getting the same errors.
D BigVarying S a Len(25000000) Varying(4)
RNF0501E Length of character item exceeds 16773104; length defaults to 16773104.
RNF0231E Length of varying length character item exceeds 16773100; length defaults to 16773100.
//Dcl-S BigVarying Varchar(25000000);
BigVarying = 'Hello world';
Return;
So, as the (duplicate) error mentions
Length of character item exceeds 16773104; length defaults to 16773104.
If you'd like a bigger length you'll need to update to a newer version of IBM i - but the max length is also 16773104, meaning 25000000 is invalid.
While RPGLE supports 16MB variables from 6.1 forward and you are on 6.1..
You have two problems:
25000000 (23.8MB) is bigger than 16773104 (~16MB)
Websphere Development Studio v7 (WDSc) is older than IBM i 6.1 (your build date is 2007, the article you're referencing came out in 2008). So your IDE doesn't recognize the new keywords and new max size.
Problem #2 isn't a deal breaker, you can simply ignore the errors in the IDE and compile on ther server successfully. If you were using the green screen editor SEU, you'd have to do the same as IBM stopped enhancing SEU at 6.1.
Related
C++, Visual Studio 2019, Windows 10, SDK 10.0.22621.0
As part of my app's log file, I have collected a few bits of information about the user's computer.
I would start the query with:
static PDH_HQUERY cpuQuery;
static PDH_HCOUNTER cpuTotal;
PDH_STATUS status;
status = PdhOpenQuery(NULL, NULL, &cpuQuery);
and then get the bits of information starting with:
status = PdhAddCounter(cpuQuery, L"\\Processor(_Total)\\% Processor Time", NULL, &cpuTotal);
if (status != ERROR_SUCCESS) {
csData += _T("GetCPURAMStatsinThread - status Add Counter Processor Time Error 2 and return *********\n");
log_write(csData);
return -1;
}
I just noticed that I am now getting the error from PdhAddCounter as:
0xC0000BB8 (PDH_CSTATUS_NO_OBJECT) The specified object is not found on the system.
The only thing that I can think of that has changed since this used to work was that I updated to SDK 10.0.22621.0. I believe that it worked with 10.0.17763.0.
I have not been paying attention to these lines in the log file, but when a customer had a problem that had to do with how many cores his CPU had, and how many virtual processors it had, then that is when I realized that these lines have been erroring out.
I have a laptop that had Windows 7, but I upgraded it to Windows 10, and ran the app on that, and it did not error out. So, does this mean an issue with the Windows 10 update, or the SDK update?
Per my comments above with #Tony Lee I used the MS sample code to browse the counters on my local computer. There was a Processor Information selection vs my original Processor under which there was a Processor Time selection. In the choice box below that there was an all instances choice and a _Total choice. When I selected the _Total choice the buffer in the sample code stayed as NULL but if I selected the all instances the buffer filled with:
L"\Processor Information(*)\% Processor Time"
Plugging that string into PdhAddEnglishCounter() worked...
Edit it also worked with PdhAddCounter()
Using Processor instead of Processor Information and (_Total) Instead of (*) used to work in Windows 10. No telling why things have changed at least on some computer.
Ed
EDIT Important note. First is that the new code above also works on the laptop on which the original code worked. Second note is that I just realized that the desktop on which the original code failed is Windows 10 Home whereas the laptop on which the original code worked is Windows 10 Pro. That maybe the difference. Regardless, the new code works on both Home and Pro.
EDIT 2 The new code also ran fine on Windows 11 Home. I also see that my customer in whose log file I noticed the error line was on Windows 11 Home. That would insinuate that the Pro version still works with the legacy (see next comment by Tony Lee) Processor while the Home versions do not work with the legacy Processor but only with the new Processor Information
I'm trying to print some tables in Windows console using C++.
My codes under default console settings:
cout << "╭─┬╮\n"
"├─┼┤\n"
"╰─┴╯\n";//Code I hope to work
cout << "╭ ─ ┬ ╮\n"
"├ ─ ┼ ┤\n"
"╰ ─ ┴ ╯\n";//Have an extra whitespace behind every character
gave me
The characters only take one space instead of two. They are squeezed together.
I have tried but didn't work:
Change code page to 65001(UTF-8)
Turn on and off every option except legacy mode in cmd settings hoping it would work.
Change font
I then used legacy console mode and this time it work, but for some reason I need it to work in newer mode. Can you tell me how to configure it right or is it just a bug?
OS: Windows 10 1909
Environment: CLion 2021.2.4 + MSVC v142, C++11
I keep on getting this error when trying to view objects in the Debugger in PyCharm:
Unable to display children:Attribute not found: value
I have deduced that it is an error with Pycharm itself, not my code
(I get the same error on multiple scripts, but no error on with an older version of Pycharm on 2 different computers)
I'm on PyCharm Community 2017.3.4
Any ideas for workarounds, other than installing an older version?
I am finding similar issues. I too think there is something up with PyCharm it does not work as expected or previous version as you mention. I also found Pyscripter to debug as expected.
In some instances I would rely on the result object, result[0] or result.getOutput(0) to pass to next tool. Instead one can use a variable for the "output" or use the string (name) directly as input for the next tool.
For example,
facility_staging_polygons = os.path.join(outGDB, 'facility_staging_polygons\Polygon_1')
result = arcpy.MakeFeatureLayer_management(facility_staging_polygons, 'facility_staging_polygons_Layer')
# Process: Update Attributes
arcpy.AddField_management('facility_staging_polygons_Layer', "area_calc", "LONG")
I've switched from FFmpeg version 1.2. to the last 2.5 release. After changing all deprecated methods I ran into a problem with a drawbox filter. In version 1.2 I could define a filled box with the following settings (see FFmpeg Filter Documentation):
strFilterDesc += "drawbox=x=0:y="+height+":w="+width+":h=50:color=0xeeeeee#0.4:t=max,
When I start the application, I receive the following errors:
[Parsed_drawbox_2 # 0x79e9a0] [Eval # 0x7fffb57f8e70] Undefined constant or missing '(' in 'max'
[Parsed_drawbox_2 # 0x75f0a0] Error when evaluating the expression 'max'.
[Parsed_drawtext_1 # 0x759be0] Failed to configure input pad on Parsed_drawbox_2
Can someone give me a hint what I'm doing wrong here? Even with the example of the documentation the same error occurs. Is there an other way to create a filled box?
Edit:
Here's the content of stfFilterDesc:
drawtext=fontfile=./fonts/truetype/freefont/HelveticaNeue.ttf: text='foo': x=5: y=5: shadowx=0: shadowy=0: fontsize=12: fontcolor=0xeeeeee#1.0: box=0: boxcolor=0xeeeeee#0.5, drawbox=x=0:y=490:w=960:h=50:color=0xeeeeee#0.4:t=max, drawtext=fontfile=./fonts/truetype/freefont/HelveticaNeue.ttf: text='foo': x=32:y=(h-text_h-25): fontsize=16: fontcolor=0x333333#1.0: box=0: boxcolor=0xeeeeee#0.4, drawtext=fontfile=./fonts/truetype/freefont/HelveticaNeue.ttf: text='foo': x=32:y=(h-text_h-10): fontsize=14: fontcolor=0x333333#1.0: box=0: boxcolor=0xeeeeee#0.4
You encountered a bug: #4332 – Expression 'max' no longer works with t option in drawbox.
This was fixed today (2015 March 2) with commit 047fd98:
commit 047fd986bf3641ad3dc137746097271c339ee5f0
Author: Michael Niedermayer
Date: Mon Mar 2 02:32:55 2015 +0100
avfilter/vf_drawbox: Fix handling of max values
Fixes Ticket4332
Signed-off-by: Michael Niedermayer
So you will need to compile or get a recent build to take advantage of this bug fix. The various static builds available via the FFmpeg download page are updated regularly.
Using the ICU library with C++ I'm doing:
char const *lang = Locale::getDefault().getLanguage();
If I write a small test program and run it on my Mac system, I get en for lang. However, inside a larger group project I'm working on, I get root. Anybody have any idea why? I did find this:
http://userguide.icu-project.org/locale/resources
so my guess is that, when running under the larger system, some ICU resources aren't being found, but I don't know what resources, why they're not being found, or how to fix it.
Additional Information
/usr/bin/locale returns:
LANG="en_US.ISO8859-1"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL="C"
If I write a small C program:
char const *lang = setlocale( LC_ALL, "" ):
I get en_US.ISO8859-1.
OS: Mac OS X 10.6.4 (Snow Leopard)
ICU version: 4.3.4 (latest available via MacPorts).
A little help? Thanks.
root is surely an odd default locale - you don't see many native root-speakers these days.
But seriously, is it safe to assume on the larger system that someone hasn't called one of the variants of setDefault("root")?
What does something like /usr/bin/locale return on this system (if you can run that)?
ICU 4.4 now has a test program called 'icuinfo', does it also return root as the default locale?
What OS/platform is this on, and which version of ICU?