1754119 Members
3412 Online
108811 Solutions
New Discussion юеВ

DCL to program

 
Wim Van den Wyngaert
Honored Contributor

DCL to program

I have a big DCL script and I would like to convert it to a program. Is there any free tool available to migrate it automatically without manual corrections afterwards ?
Reason : performance.

Wim
Wim
23 REPLIES 23
Karl Rohwedder
Honored Contributor

Re: DCL to program

Wim,

as far as I know, there is no such tool.

In former days there was a tool to convert DCL to FORTRAN, but I don't know what happened to it.

Since DCL may perform a lot of substition or image activations during runtime, the performance benefit of a high level language is questionable.


mfg Kalle
Ian Miller.
Honored Contributor

Re: DCL to program

I have not seen one. The performance gain depends on what the DCL does but can be significant especially if you program what is intended rather than a literal translation.
____________________
Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: DCL to program

Any hints of how to improve performance are also welcome. Are there logicals that can influence DCL ?

I already
1) optimized working set size
2) minimized number of char for a command
3) installed freq used commands

The script is 4000 lines and is using a lot of gosub's. Calls are used less because resulting in extra load.

Wim
Wim
Ian Miller.
Honored Contributor

Re: DCL to program

depends on the dcl but a lot of DCL runs lots of images so it helps if the images are installed (at least open/header). Often the frequent image activation overhead is the thing that takes most time so if you can run less images or less often then its a good thing.
____________________
Purely Personal Opinion
Karl Rohwedder
Honored Contributor

Re: DCL to program

Wim,

I'm sure you did already:
- squeeze the procedure using DCL_DIET or an
equivalent tool
- may be put it on a ramdisk
- tweak RMS parameters to faster read the
procedure

mfg Kalle
Wim Van den Wyngaert
Honored Contributor

Re: DCL to program

Karl,

Is ramdisk still needed with the file cache ?

The procedure is executed once and stays active for days or weeks. Is DCL reading it again and again or how is this working in detail ?

I did a manual diet but want to keep it readable.

Wim
Wim
Karl Rohwedder
Honored Contributor

Re: DCL to program

I suppose a Ramdisk... is then not needed, if
it stays online for days.

May be it is possible to reduce the number of image activations, e.g. I have seen examples, where a routine does:
$ image par1
$ image par2
$ image par2
which could be replaced by
$ image
par1
par2
par3
(simple example, I know :-])

mfg Kalle
Wim Van den Wyngaert
Honored Contributor

Re: DCL to program

Karl,

Thx for the suggestion. I already did it but forgot to mention it.

Wim
Wim
Hein van den Heuvel
Honored Contributor

Re: DCL to program


Did the dcldiet version run significantly faster?


Have you done the basic performance analysys where you for example identify which chunk is slow? For example:
- maybe the procedure has an init, read, sort, update, delete, report, exit phase and only a single stage reallly defines the time.
- maybe there there are a few loops. What is the order of magnitude of the loop count? thousands? millions? The millions loop should probably be a program.

How about a partial solution? Maybe a particula file analysis phase is more readily done in... perl ?

Show us / describe the part the you think hurts, and maybe we see a speedier solution
(provide sample input/output data if appropriate).

Groetjes,
Hein.