RTollison
Members-
Content Count
107 -
Joined
-
Last visited
Everything posted by RTollison
-
if you were given a unc path how can you determine the \\server\share part of say \\server\share\myfolder
-
yes but i am not a network educated so i dont know if there is a limitaion so if \\server\share is gospel then i can run with that. thanks
-
currently use a loop and random to get a value between a range. first on was simple enough value1 := random (250) + 1 (value from 1 thru 250) second halfway simple value2 := random(500) + 1; set initial random value while value2 < 251 do value2 := random(500) + 1; value3 := random(750) + 1; while value3 < 501 do value3 := random(750) + 1; value4 := random(1000) + 1; while value4 < 751 do value4 := random(1000) + 1; sometimes it is pretty quick, other times is seems to hang for a bit. < 10 seconds so that got me to thinking, is there a better way to random values bewteen a range?
-
holy crap thank you all again. you really don't know how much i appreciate this. beein fighting a bad sinus/ear infection and am way too tired to be using what little of my brain is functioning. thank you , thank you, thank you.
-
got that implemented, thanks again. now he asked be something else and if i am correct, he is asking for overlapping numbers with without duplicating them. i can deal with any duplicates with a while statement but here is basically what is asking for. value1 = 1-300 value2 = 100-550 value3 = 250-750 value4 = 500-1000 not sure what he is looking for but he wanted me to let him enter the ranges instead of the hardcoded ranges (which is what he said he wanted but now wants to expand upon for his own purposes). i asked about any of the overlaps if he wanted to force then higher and he said that the overlapping is fine. so if we retrieve values like value1=225 value2=200 value3=299 value4=500 That would be ok. told him that I had no idea how this is helping. why not throw darts at a board. but he said now he could put his dart board away.
-
thank you all. yeah i didnt think this one thru very well did I. used to our cobol random command and didn't even go to the point of adding a larger value than 1. sorry for such a stupid question...
-
user wants a chart to show the records in a table. the tables structure is quite simple: date, value1, value2,... value10 a date and then 10 numbers, the numbers are not in any order and that is fine. they max out at 200. 11/01/23, 101, 12, 32, 157, 1, 77, 18, 182, 45, 133 11/02/23,.... 11/03/23,... in a mock up of the chart i put the series titles as the date and the data values i entered all down in 10 rows and showed him the sample and he said that was exact what he wanted. now in my dataset query i am pulling * with date range but now matter what i try to do in the dbchart i cant seem to replicate. there is no correspondence between the numbers start/end from date to date. even if the numbers are the exact same and in the same order then so be it. select * from table1 is basic query with a date range and that is working fine just not sure how to tie that data into the chart to get the same results.
-
here is what i found and tested. works to a degree (no series titles but he seems ok with it) just a mess looking to me. begin DBChart1.View3D:=false; DBChart1.Legend.Visible:=false; with DBChart1.AddSeries(TFastLineSeries) as TFastLineSeries do begin XValues.Order:=loNone; TreatNulls:=tnDontPaint; adodataset1.First; while not adodataset1.Eof do begin AddNullXY(0,0); //start a new line AddXY(0,adodataset1.FieldByName('num_1').AsInteger); AddXY(1, adodataset1.FieldByName('num_2').AsInteger); AddXY(2, adodataset1.FieldByName('num_3').AsInteger); AddXY(3, adodataset1.FieldByName('num_4').AsInteger); AddXY(4, adodataset1.FieldByName('num_5').AsInteger); AddXY(5, adodataset1.FieldByName('num_6').AsInteger); AddXY(6, adodataset1.FieldByName('num_7').AsInteger); AddXY(7, adodataset1.FieldByName('num_8').AsInteger); AddXY(8, adodataset1.FieldByName('num_9').AsInteger); AddXY(9, adodataset1.FieldByName('num_10').AsInteger); adodataset1.Next; end; end; end;
-
is there a way with the TFileOpenDialog to limit the directory to a specified folder or downstream but not allow going upstream. c:\myfolder\ and any subfolder from there but not allow user to go above that to say c:\ or c:\yourfolder...
-
well that really opens up a big can of worms doesn't it. i found all the file compares but not the same as a path parent/child comparison. Again you are correct in thinking about UNC/Mapped comparisons because that actually was the next question to come up. I will keep digging around and thanks for the heads up.
-
you have my attention, but by System API what are you referring to. i can google just need something to look for. Thank You
-
i appreciated the help enough to try and figure it out. knew the code was off the top but figured it was something to work with. i googled the heck out of those options but still not able to figure it out. and i like figuring it out if possible on my own. but my limited knowledge just didn't get past the mismatch stuff. as for the x0000000... error i googled it and it said i was denied access. again apologies for not going back directly but i wanted to figure it out and failed miserably. however i did (on the surface) get this to work. probably not the best solution but it seems to be working. procedure TForm3.FileOpenDialog1FolderChanging(Sender: TObject; var CanChange: Boolean); var Dlg: TFileOpenDialog; DefFolder: IShellItem; iOrder: Integer; Path: PWideChar; begin CanChange := False; Dlg := Sender as TFileOpenDialog; if Succeeded(SHCreateItemFromParsingName(PWideChar(WideString(Dlg.DefaultFolder)), nil, IShellItem, DefFolder)) then try begin Dlg.ShellItem.GetDisplayName(SIGDN_FILESYSPATH, Path); CanChange := ContainsText(Path, Dlg.DefaultFolder); end; finally begin DefFolder := nil; end; end; Path := ''; end;
-
Yes sir, I got error messages about mismatch field types(compilig) and on one of the isparent functions it would compile but then i got an error message about access denied with 0000434 or something like that. I tried to resolve them but honestly, i could not figure out what needed to be done.(IShellItem is beyond my programming experience and i really hate bothering others when they have given me something to work with) so while doing the digging around i noticed that the ishellitem has a getdisplayname option (hoping for a string value) so i can then run containstext to check it that way.
-
this is what i found to keep the folder from changing at all but just staying in the defaultfolder. I am trying to figure out how to update the compare command and do a isparent. i see there is a getparent option just not able to implement it on my own. procedure TForm3.FileOpenDialog1FolderChanging(Sender: TObject; var CanChange: Boolean); var Dlg: TFileOpenDialog; DefFolder: IShellItem; iOrder: Integer; begin CanChange := False; Dlg := Sender as TFileOpenDialog; if Succeeded(SHCreateItemFromParsingName(PWideChar(WideString(Dlg.DefaultFolder)), nil, IShellItem, DefFolder)) then try CanChange := Dlg.ShellItem.Compare(DefFolder, SICHINT_ALLFIELDS, iOrder) = S_OK; finally DefFolder := nil; end; end;
-
all good and valid reasons for not creating the dll, but lets just say that i want the challenge because i have nothing better to do. so now i am committed to creating this dll for the sake of creating such a dll with this very dialog feature. NOTE: This very question has been asked by others in the past so maybe there is some kind of reward at the end of the rainbow.
-
IT has already went down this road with locking up everything except clients own mapped drive. we had to create dlls already for accessing ftp, http, mapi, smtp and other functions. when clients were locked out of the servers c drive it broke some of our dll functionality. they had to open up locations randomly as clients were getting an error about some missing feature or whatever. so as it stands now they are locked out of most places that they shouldn't be allowed, but our cobol program runtime has a file explorer library that we use in some programs. like say a file extract for payroll ACH. now we open up the explorer window and in theory they would selelct the file from the folder we prompted to them. but a few have navigated to other folders and could use the preview to see what was in the other folders/files. So this new dll is to put an end to the wandering user. not about security but prevent the wandering user.
-
my apologies it was a post you edited windows - How to retrieve creation date of an IShellItem? - Stack Overflow and thank you for this update. really appreciate it.
-
i found this old post, Remy's, and i am wanting to figure out how to allow user to navigate downfolder and back up to initialidir folder. so if initialdir = v:\myfolder then they can go anywhere downfolder from there but can not go to v:\ stop at v:\myfolder. procedure TForm1.FileOpenDialog1FolderChanging(Sender: TObject; var CanChange: Boolean); var Dlg: TFileOpenDialog; DefFolder: IShellItem; iOrder: Integer; begin CanChange := False; Dlg := Sender as TFileOpenDialog; if Succeeded(SHCreateItemFromParsingName(PWideChar(WideString(Dlg.DefaultFolder)), nil, IShellItem, DefFolder)) then try CanChange := Dlg.ShellItem.Compare(DefFolder, SICHINT_ALLFIELDS, iOrder) = S_OK; finally DefFolder := nil; end; end;
-
parallels with a published app that has limited UI for folder/file selection. we have restricted permissions set and stuff but some locations the user HAVE to have permissions, c:\... for some windows api stuff. well now all users can go nuts on some of those files if they are so inclined. we map a drive for each client but the base drive d is available to allow some navigation and stuff like that. so yes we have restricted access but a fileopendialog will let you go just about anywhere.
-
no explorer option allowed except thru this yet to be finished dll.
-
reason for this is cloud server and multiple clients. we give them a specific folder that is theirs but if we allow them to navigate to other clients folders it presents a security problem. we have permissions in place but not fullproof just yet.
-
Register COM Object for create process/Fightiing AntiVirus
RTollison replied to RTollison's topic in General Help
at the normal 10 threads it takes the 12-14 hours. the thycotic jumps to like 80% of cpu and stays around that percentage throughout the process. so it brings my system to a crawl because overall 100% of cpu stays pegged. from a cmd prompt if i execute the compile command with all the parameters it takes less than 1 second for most cobol programs a few take 3-4 seconds (lots bigger programs). i put 52 compiles into a batch file and they completed fairly quickly(< 1 minute). but those same programs in my mass compile program took 6 miniutes to finish. so for whatever the reason thycotic goes nuts and eats a bunch of cpu time which slows down everything. maybe i will just create a batch file with everything to compile with all the proper parameters and then just run the batch file. another code change but will see what happens. that would be faster overall but would go back to 1 compile command at a time. but still better than the 12 hours -
Register COM Object for create process/Fightiing AntiVirus
RTollison replied to RTollison's topic in General Help
Sorry if you just type the ccbl32 with anything other than -help or with all the actual parameters it just throws up the -help option. no compiling. in my threading the default number is 10 but i wanted to see what was going on so i ran it up to 50 and that was when i noticed the thycotic.exe was going nuts as well. since creating a COM or whatever seems out of line i can tinker with process and TDOSCommand to create a fake threading. since the doscommand has an onterminated events then i can just spin up that many processes and let them run and decrease a counter when done. i should be able to make that work. -
Register COM Object for create process/Fightiing AntiVirus
RTollison replied to RTollison's topic in General Help
C:\AcuCobol_925>ccbl32 -help COMPILER: ccbl [options] source_file -v Verbose compiler -w Suppress warnings -e Error output to named file -o Name object file -x Ignore CBLFLAGS environment -a Show all warnings -$ HP e3000 conditional compilation *** Listing Options *** -Li Print general information -Lo Name listing file -Lf Print full listing -Lx Print extended statistics -Ls Print symbol table -Ll Set page length -Lw Wide listing format -Lc Cross-reference listing -Lp Print preprocessed source -La Split out 'cautions' *** Compatibility Modes *** -Cr RM/COBOL(tm) compatibility -Ci ICOBOL(tm) compatibility -Cb Default organization is BINARY -Ce Use source/copy name extension -Cf Use fixed-length records -Ca Use ANSI ACCEPT and DISPLAY -Ck Indexed keys in SELECT order -Cm SELECT allows IBM COBOL syntax -C3 Version 1.3 compatibility -C4 Version 1.4 compatibility -C5 Version 1.5 compatibility -C## Version #.# compatibility -Cv IBM DOS/VS Cobol compatibility -Cp HPe3000 Cobol compatibility -Cg Ignore conditional compilation *** Video Options *** -Vh Default intensity is high -Vl Default intensity is low -Va Alternate ACCEPT intensity -Vq Quiet ACCEPT statements -Vc Imply CONVERT on numeric ACCEPT -Vd Imply CONVERT on numeric DISPLAY -Vx Always allow exception keys -Vb Treat BLANK LINE as BLANK EOL -Ve# Set EXCEPTION mode -Vu Imply UPDATE on ACCEPT -Vi Use item color on erase -Vg# Do not propagate COLOR *** Data Item Options *** -Db Treat COMPUTATIONAL as BINARY -D2 Treat COMPUTATIONAL as COMP-2 -D6 Treat unsigned PACKED as COMP-6 -D1 Put PIC 99 binary in one byte -Ds Imply SIGN IS SEPARATE phrase -D5 Treat BINARY as COMP-5 -Da# Align data on #-byte boundaries -Dm Minimize binary data size -Dl# Set SYNC boundary limit to # -Dy Imply SYNC for all binary data -Dz Relax size-checking rules -Di Initialize WORKING-STORAGE -Df COMP-1/COMP-2 are FLOAT/DOUBLE -Dw# Set maximum target word-size -DCa Use ACUCOBOL numeric formats -DCi Use IBM numeric formats -DCm Use Micro Focus numeric formats -DCn Use NCR numeric formats -DCb Use MBP numeric formats -DCr Use Realia numeric formats -DCv Use VAX/COBOL numeric formats -Dx# Set size of index data items -D7 Micro Focus binary data size -Dd31 Allow 31 digits in numeric items -Dv=# Default value of data -De Assume linkage is not aligned -Dq Treat QUOTE as APOSTROPHE --fastRefMod Use optimized method for reference modification --fpRounding=[OSVS|VSC2] Emulate OSVS or VSC2 style rounding --lastWSDataSeg=# Number of data segments used for WORKING-STORAGE --noAlignLit Do not use default algorithm for aligning literals --noTrunc Binary items not trimmed to picture on store --truncANSI Don't truncate stores in COMP-5 *** Debugging Options *** -Ga Include everything -Gy Include symbols (-Zs) -Gd Include source (-Zd) -Gl Include line numbers -Gs Include extra symbol info -Gz Prevent program from being debugged *** Miscellaneous Options *** -Zi Imply IS INITIAL PROGRAM -Zn Turn off local optimizer -Za Check array bounds at runtime -Zg Enable segmentation -Zc Optimize for space over speed -Zz Treat spaces as zero in numbers -Zr0 Disallow recursive PERFORMS -Zl Create large-model program -Zy Use 4-digit year in DAY/DATE -Zf Create #define file -Z3 Restrict code to version 1.3 -Z4 Restrict code to version 1.4 -Z5 Restrict code to version 1.5 -Z## Restrict code to version #.# -Zw Prepare for workbench import -Zm Include ADDRESS OF memory sizes -Ze Include XML symbol table --acceptRefresh Use current value of variable in screen ACCEPT --arithmeticVSC2 Truncate according to the rules of VS COBOL II --binaryMath (--bin) Use binary math when able to (default for 7.3+) --brand nnn Brand the object with serial number nnn --decimalMath (--dec) Always use decimal math package (pre-7.3 default) --newARC Use relaxed Abbreviated Combined Relation syntax --relaxRBUsing Allow radio button USING to be indexed data items *** Mapping Options *** -Mp List all paragraph names -Mr List all reserved words -Ms List all opened source files -Mv List all variable names -Mo Specify an output file -Ml List names in lowercase -Mu List names in uppercase -Mm List names in mixed case -Mc List all control properties -Mw List screen section info -Me List all entry points -Mx Create XCDs *** File Options *** -Fs Implied START TRANSACTION -Ft Transact all file operations -Fl Single lock mode default -Fo Set directory for XFD files -Fx Create XFDs for indexed files -Fa Create XFDs for all file types -F# Create version n XFDs [n=3,4,5] -Fc Preserve case of field names -Fe Create old format XFD files -Fv Include comments in XFD files -Fp ALL files are OPTIONAL -Fm Default lock mode is manual -Fn No file sharing by default --fileAssign=[DYNAMIC/EXTERNAL] Specify default file assignment --fileIDSize=[2/4/8] Specify size of file handles passed to COBOL *** Source Options *** -Sa Force ANSI source format -St Force terminal source format -Si Include lines based on pattern -Sx Exclude lines based on pattern -S# Set tabs every # columns -Sr Use RM/COBOL compatible tabs -Sd Include debugging lines ('D') -Sp Specify COPY search path -Sc Specify code system -Sl Force long line source format *** Warning Options *** -Wa Warn on misaligned using -Wl Warn on non-01 level using -Wr Warn on 01 level redefines too long *** Object-Code Options *** -n Generate native code for host --ia-32, --intel Generate Intel IA-32 code --pa_risc, --pa Generate PA-RISC 1.0 32-bit code --pa_risc_2.0, --pa2 Generate PA-RISC 2.0 64-bit code --powerpc, --ppc Generate PowerPC 32-bit code --powerpc_64, --ppc64 Generate PowerPC 64-bit code --power Generate POWER-compatible 32-bit code --sparc Generate SPARC 32-bit code --sparc_v9 Generate SPARC 64-bit code --noInlineCall Turn off inline CALL optimization *** ESQL Pre-compiler options *** -Pc Connect to database to check SQL -Pd Specify database for connection -Pi Specify SQL include directory -Pk Specify keyword set -Pp Specify database password -Pr Relaxed syntax checking -Ps Precompile and compile -Pu Specify database user name -Pw List keywords -Pv Relax rules for VARCHAR items -Pg Preprocess using next argument -Pe Include ESQL in listing & debug Additionally, the following commands may be used (as described above): -e filename; -Sa; -Sd; -Si; -St; -Sx The output will be sent to stdout unless otherwise specified *** Reserved Words *** -Rr Suppress RM/COBOL(tm) words -Rv Suppress VAX/COBOL(tm) words -Ra Suppress ACUCOBOL(tm) words -R8 Suppress 1985-standard words -Rs Suppress Screen Section words -Rw Suppress individual word -Rc Change reserved word -Ri Suppress ICOBOL(tm) words -Rx Ignore any particular word -Rn Make synonym for reserved word -R2 Suppress 2002-standard words *** Error options *** -Qm Max error count -Qp Skip to next period on error *** Conditional compile options *** /CONSTANT name value /[no]directive *** Internal table options *** -Td # Identifier and statement table -Te # Subscript statement table *** Interoperability options *** --javaclass Generate a .java class to call this COBOL program --javamain Generate a .java main to call this COBOL program --netdll Generate a .net DLL to call this COBOL program --netexe Generate a .net EXE to call this COBOL program INFORMATION: cblutil -info object_files ... LIBRARIAN: cblutil -lib [options] object_files ... -o Name new library file -v Verbose librarian -r Remove object files if okay CODE TRANSLATION: cblutil -native [options] object_files ... -o Name output file -v Verbose translator -Zc Optimize for space over speed -Zn Turn-off optimizer --ia-32, --intel Generate Intel IA-32 code --pa_risc, --pa Generate PA-RISC 1.0 32-bit code --pa_risc_2.0, --pa2 Generate PA-RISC 2.0 64-bit code --powerpc, --ppc Generate PowerPC 32-bit code --powerpc_64, --ppc64 Generate PowerPC 64-bit code --power Generate POWER-compatible 32-bit code --sparc Generate SPARC 32-bit code --sparc_v9 Generate SPARC 64-bit code RUNTIME: runcbl [options] [ object_file [parameters] ] -d Run with debugger -r Run debugger from script -e Direct error output to file -ee Redirect stderr to file -w Suppress warning errors -s Prevent user aborts (safe) -c Name configuration file -l List configuration file -v Print version number -# Set switch to ON -i Set input to file -o Set output to file -a Name assembly library -y Name COBOL library -x Show extended error messages -h Ignore hangup -b Background processing -
Register COM Object for create process/Fightiing AntiVirus
RTollison replied to RTollison's topic in General Help
this compiler does not have batch mode (acu cobol) everything is in a whitewashed folder, IT said that anything in C;\coboldev would not be scanned (we made sure that the spelling was exactly the same) and everything involved here is in the coboldev folder. hard drive is SSD. Like i stated the only variance here is the AV. when i start running my program for all with say 250 threads, i watch task manager and i see my ccbl32.exe start up but then i see thycotic going nuts on cpu usage. i told IT no you not excluding that folder because everything of mine is in that folder. after much back and forth IT thought that the create process for the ccbl32 was doing something else that the AV was trying to monitor.