|
<snip>
Did you mean Row and column access control rules for RCAC here? can those
be obtained using DSPFD as well if not any SQL query for the same?
...
Can we get Commitment control information using any SQL query here?
</snip>
For RCAC see the system catalog. For details the one you're looking for is
SYSCONTROLS. If you just want to know if it has RCAC, then look at
SYSFILES.
Whether or not you're using commitment control on a file is not file
information. It's more of a job information. For example, in sql there's
a commitment option like WITH NC. However a file has to be journaled in
order to use commitment control. For journal information see:
JOURNALED_OBJECTS
For constraint information, like primary keys, foreign keys, check
constraints, etc see SYSCST.
On Thu, Jun 29, 2023 at 8:30 AM tim ken <timk2574@xxxxxxxxx> wrote:
Hi,that
Thanks for all these inputs here.
Since I want to get information related to other important things like
triggers etc.
So I tried to execute the below command but it ended up with this error
"OUTFILE not allowed with specified TYPE." So is there any way to get
information here in DSPFD and using some other system table likeWRKMBRPDM
'qsys2.syspartitionstat' etc.?
DSPFD FILE(*ALL) OUTPUT(*OUTILE) OUTFILE(MYFILE/MYLIB)
also with some limitation (by removing *all for some of the fields in
above command and with *MBRLIST in 'Type of information') when ran DSPFD
command and compared it's outfile field 'Number of Records' with select
system_table_schema, system_table_name, system_table_member,
number_rows
from qsys2.syspartitionstat;
for a specific source file.'Number Rows' both count matched with
(Option 8- Display Description --> Number of Records) but when i wentof
inside that particular member and checked lines count were actually
different.
also in below parameters what does 'Transaction Rate' mean exactly ?
Did you mean Row and column access control rules for RCAC here? can those
be obtained using DSPFD as well if not any SQL query for the same?
Can we get PASE/Open source related information using some SQL query as
well?
Can we get Commitment control information using any SQL query here?
Thanks a lot ...
On Thu, 29 Jun 2023 at 12:10, x y <xy6581@xxxxxxxxx> wrote:
No.
As others have pointed out, this task doesn't make much sense. What
problem is the requester trying to solve? It seems there's a problem
letsome sort and the requester thinks evaluating program complexity is the
answer. The outlier answer is that you're being pranked. But we'll
ranksyou rule that one out.
I'm going to go contrarian and suggest there may be some value in this
exercise. For example, if a simple CRUD (file maintenance program)
poorly-trainedhigh on the complexity scale, it may be time for a rewrite.HIghly-complex
programs may be loaded with technical debt, or written by
logicand inexperienced programmers, or suffering from years of business
leadchanges stacked on top of other business logic changes, all of which
otherto program instability/failure.
The problem with the request is that "complexity" is highly subjective.
*Highly.*
There are two aspects of complexity: one is about the code and the
is*
about the application/business rules.
A few lines of code from one of my service programs:
theta = lon1 - lon2;
dist = sin(deg2rad(lat1)) * sin(deg2rad(lat2)) + cos(deg2rad(lat1))
merelycos(deg2rad(lat2)) * cos(deg2rad(theta));and
Is this a complex program? Code=no, application=yes.
I have a 9,000 line batch program--it creates AR, payables, statistics,
general ledger entries from orders. If you understand the rules ofrevenue
accounting, the program is not complex--I used lots of variables,descriptive)
subroutines, and subprocedures with meaningful (i.e., long and
names.
You can advise the user that "lines of code" isn't a valid metric
code,because an RPG expression can be spread over several lines and it would
take moderate effort to reduce every expression to a single line of
towhich would give you a realistic number of lines of code, again notingthat
this number doesn't have any validity on its own.your
Let's talk techniques. You can measure cyclomatic complexity; I'm not
aware of any RPG tools that do it.
Recognizing that I'm giving comfort to the enemy, a less-unreasonable
approach is to pick a technique to parse your source code, analyze all
programs using that one approach, and then rank the results. You cancount
subroutines, procedures, arrays, pointers, called programs, variables,
length of the variables' names, REGEX's, files/tables, GoTo's, SQL
statements, and built-in functions. Other factors might include
development time and how long it took to get from the initial version
takethe final production version (more complex programs will invariably
eachlonger). In-line comments, although not executable, can be included inthe
line counts (but many comments have zero value). Assign a weight to
considerfactor and you'll get a number for a program. Do all your programs andyou
can then identify program complexity by ranking them. You might
*assigning multiple complexity rankings. When you review your results,you
might adjust your weights to make the programs you categorize as"complex"
show high in the complexity ranking. If you work this right, you canjack
the results to satisify your goals.
One potential problem: dead (unused/unreferenced) code will skew your
results.
A few lines of code from one of my service programs:
theta = lon1 - lon2;
Looks easy, right? But "theta" as a meaningful variable name?
How about this?
dist = sin(deg2rad(lat1)) * sin(deg2rad(lat2)) + cos(deg2rad(lat1))
bycos(deg2rad(lat2)) * cos(deg2rad(theta));
Does this code make this a complex program?
Here's an example of why attempting to measure program complexity is a
fool's errand. Take a look at APL, the programming language invented
manyIBM's Ken Iverson. In APL, here's how you compute standard deviation:an
SD←((+/((X - AV←(T←+/X)÷⍴X)*2))÷⍴X)*0.5
Does the fact this "program" is one line mean the program is simple or
complex? You can do this easily with SQL; it's a bit of code in RPG.
Here's how you compute Pick-6 lottery numbers in APL:
x[⍋x←6?40]
SYMBOLS? Good luck assigning a complexity ranking to a symbol. I took
internal IBM class in APL back in the 70's and the instructor noted
differentAPL programmers couldn't understand other programmers' APL coding. APLall
makes my hair hurt and I have a full head of hair.
My point: language specifics and coding style greatly affect perceived
program complexity.
Have fun with this...
On Tue, Jun 27, 2023 at 9:16 AM tim ken <timk2574@xxxxxxxxx> wrote:
Hi,
Is there any SQL query which could provide lines of code used inside
howthe programs and all the associated modules used in the entire IBM i
system?
Also in this SQL query can we know how many lines are commented and
many lines are actual program and module code separately in
mailingcolumns against each program and it's associated module name ?
Thanks a lot...
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
relatedlistrelated
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
listquestions.--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
listquestions.--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.