[Info-vax] DCL Integer Overflow

Jan-Erik Soderholm jan-erik.soderholm at telia.com
Wed Jul 12 09:38:43 EDT 2017


Den 2017-07-12 kl. 15:08, skrev Simon Clubley:
> On 2017-07-12, VAXman-  @SendSpamHere.ORG <VAXman- at SendSpamHere.ORG> wrote:
>>
>> What I can not fathom is why anyone would be using DCL or, for that matter,
>> any interpreted scripting lingo for doing such things?
>>
> 
> Because for the right application (and the right scripting language)
> it's a lot quicker to put something together than it is to use
> a traditional programming language.

Just a short example where built-in iteration over arrays in Python
makes the code short and easy to read:

This is scripting and just as easy to edit/run as DCL.
But DCL cannot do this (as easy), of course.

---------------------------------------------------
$ type examp.com
$ python

import rdb

# define SQL statement...

emp_sql = rdb.statement("""select EMPLOYEE_ID, LAST_NAME, FIRST_NAME
     from EMPLOYEES where LAST_NAME like '%an %'""")

# Run the SQL statement on the Rdb example database
# and fetch into array emps...

rdb.attachDB('PERSONNEL.RDB')
rdb.read_only()
emp_sql.execute()
emps = emp_sql.fetchall()
rdb.commit()

# iterate over the result and print (or do something else)...

for emp in emps:
   print emp[0], emp[1], emp[2]
---------------------------------------------------

And when run this gives:

---------------------------------------------------
$ @EXAMP.COM
00184 Frydman        Louie
00190 O'Sullivan     Rick
00221 Sullivan       Len
00230 Tarbassian     Louis
00239 Sarkisian      Dean
00246 Lonergan       Peter
$
---------------------------------------------------

I do a lot of this for fault tracing, general analysing
or "patching" the database in case of errors.

Doing the same in C or Cobol is a lot more work and
it would be close to impossible to do stricly in DCL.




More information about the Info-vax mailing list