Dclgen and copybooks

RB Jóhannes Gíslason

Dclgen and copybooks
Hi

Has anyone how to get dclgen, to add offsets into PL/ 1 copybook. By that I
mean some thing this



DCL 1 DCLSP_OFJAR,
5 SPOFJ_BANK CHAR(4), /* 1 - 4 */
5 SPOFJ_HBOK CHAR(2), /* 5 - 6 */
5 SPOFJ_RNUM CHAR(6), /* 7 - 12 */



If not possible by dclgen itself is there an exit in dclgen so this process
can be performed by dclgen? Is there another way?



Johannes Gislason
Icelandic Banks Data Centre
Kalkofnsveg 1
150 Reykjavik
Iceland
tel. +354 5698877
fax +354 5622470

--------------------------------------------------------



Þessi tölvupóstur ásamt fylgiefni getur verið trúnaðarmál aðeins ætlaður
þeim, sem hann er sendur til. Öll önnur notkun er óheimil og vísast til
laga um fjarskipti nr. 107/1999, 2. mgr. 44 gr. Efni tölvupóstsins er á
ábyrgð sendanda ef það tengist ekki starfsemi Reiknistofu bankanna.



This e-mail and its attachments may contain confidential information only
intended for the addressee. If you are not the intended recipient of this
e-mail please advise the sender and delete this e-mail from your system
without making a copy or duplicate of any kind.


RB Jóhannes Gíslason

Dclgen and copybooks
(in response to Moyeen Khan)
Hi

Has anyone how to get dclgen, to add offsets into PL/ 1 copybook. By that I
mean some thing this



DCL 1 DCLSP_OFJAR,
5 SPOFJ_BANK CHAR(4), /* 1 - 4 */
5 SPOFJ_HBOK CHAR(2), /* 5 - 6 */
5 SPOFJ_RNUM CHAR(6), /* 7 - 12 */



If not possible by dclgen itself is there an exit in dclgen so this process
can be performed by dclgen? Is there another way?



Johannes Gislason
Icelandic Banks Data Centre
Kalkofnsveg 1
150 Reykjavik
Iceland
tel. +354 5698877
fax +354 5622470

--------------------------------------------------------



Þessi tölvupóstur ásamt fylgiefni getur verið trúnaðarmál aðeins ætlaður
þeim, sem hann er sendur til. Öll önnur notkun er óheimil og vísast til
laga um fjarskipti nr. 107/1999, 2. mgr. 44 gr. Efni tölvupóstsins er á
ábyrgð sendanda ef það tengist ekki starfsemi Reiknistofu bankanna.



This e-mail and its attachments may contain confidential information only
intended for the addressee. If you are not the intended recipient of this
e-mail please advise the sender and delete this e-mail from your system
without making a copy or duplicate of any kind.


Moyeen Khan

Re: Dclgen and copybooks
(in response to RB Jóhannes Gíslason)
1.You could compile the program, issue SE against the output in SDSF, cut
and paste the offset.s
2. Write a small rexx routine to get the offsets

My 2 cents




RB Jóhannes
Gíslason To: [login to unmask email]
<Johannes.Gislaso cc:
[login to unmask email]> Subject: Dclgen and copybooks
Sent by: DB2 Data
Base Discussion
List
<[login to unmask email]
LASSOC.COM>


01/16/2003 01:31
PM
Please respond to
DB2 Data Base
Discussion List






Hi
Has anyone how to get dclgen, to add offsets into PL/ 1 copybook. By that I
mean some thing this

DCL 1 DCLSP_OFJAR,
5 SPOFJ_BANK CHAR(4), /* 1 - 4 */
5 SPOFJ_HBOK CHAR(2), /* 5 - 6 */
5 SPOFJ_RNUM CHAR(6), /* 7 - 12 */

If not possible by dclgen itself is there an exit in dclgen so this
process can be performed by dclgen? Is there another way?



Johannes Gislason
Icelandic Banks Data Centre
Kalkofnsveg 1
150 Reykjavik
Iceland
tel. +354 5698877
fax +354 5622470


--------------------------------------------------------





Þessi tölvupóstur ásamt fylgiefni getur verið trúnaðarmál aðeins ætlaður
þeim, sem hann er sendur til. Öll önnur notkun er óheimil og vísast til
laga um fjarskipti nr. 107/1999, 2. mgr. 44 gr. Efni tölvupóstsins er á
ábyrgð sendanda ef það tengist ekki starfsemi Reiknistofu bankanna.





This e-mail and its attachments may contain confidential information only
intended for the addressee. If you are not the intended recipient of this
e-mail please advise the sender and delete this e-mail from your system
without making a copy or duplicate of any kind.












Bernd Oppolzer

Re: Dclgen and copybooks
(in response to RB Jóhannes Gíslason)
Two suggestions on this:

you could write your own DCLGEN by using a normal SQL catalog query, such as

select ...
from sysibm.syscolumns
where tbcreator = :tc
and tbname = :tn
order by colno;

With this approach, it should be possible to add the offsets. But keep
attention on "holes", that is, padding bytes in PL/1 due to storage alignment
of PL/1 structure elements. In fact, it is VERY complicated to do the
calculations of the offsets right, especially in PL/1. It's somewhat easier in
COBOL or C. The offsets differ in these languages, given the same structure
layout! Look at the structure maps, which are hopefully included in your
compiler listings. If not, you can switch them on with a compiler option.

Regards

Bernd



Am Don, 16 Jan 2003 schrieben Sie:
>
> Hi
>
> Has anyone how to get dclgen, to add offsets into PL/ 1 copybook. By that I
> mean some thing this
>
>
>
> DCL 1 DCLSP_OFJAR,
> 5 SPOFJ_BANK CHAR(4), /* 1 - 4 */
> 5 SPOFJ_HBOK CHAR(2), /* 5 - 6 */
> 5 SPOFJ_RNUM CHAR(6), /* 7 - 12 */
>
>
>
> If not possible by dclgen itself is there an exit in dclgen so this process
> can be performed by dclgen? Is there another way?
>
>
>
> Johannes Gislason
> Icelandic Banks Data Centre
> Kalkofnsveg 1
> 150 Reykjavik
> Iceland
> tel. +354 5698877
> fax +354 5622470
>
> --------------------------------------------------------
>
>
>
> Þessi tölvupóstur ásamt fylgiefni getur verið trúnaðarmál aðeins ætlaður
> þeim, sem hann er sendur til. Öll önnur notkun er óheimil og vísast til
> laga um fjarskipti nr. 107/1999, 2. mgr. 44 gr. Efni tölvupóstsins er á
> ábyrgð sendanda ef það tengist ekki starfsemi Reiknistofu bankanna.
>
>
>
> This e-mail and its attachments may contain confidential information only
> intended for the addressee. If you are not the intended recipient of this
> e-mail please advise the sender and delete this e-mail from your system
> without making a copy or duplicate of any kind.
>
>
>

----------------------------------------
Content-Type: text/html; name="unnamed"
Content-Transfer-Encoding: quoted-printable
Content-Description:
----------------------------------------



Roger Miller

Re: Dclgen and copybooks
(in response to Bernd Oppolzer)
On Fri, 17 Jan 2003 10:39:05 +0100, Bernd Oppolzer <[login to unmask email]
ONLINE.DE> wrote:

>Two suggestions on this:
>
>you could write your own DCLGEN by using a normal SQL catalog query, such
as
>
>select ...
> from sysibm.syscolumns
> where tbcreator = :tc
> and tbname = :tn
> order by colno;
>
>With this approach, it should be possible to add the offsets. But keep
>attention on "holes", that is, padding bytes in PL/1 due to storage
alignment
>of PL/1 structure elements. In fact, it is VERY complicated to do the
>calculations of the offsets right, especially in PL/1. It's somewhat
easier in
>COBOL or C. The offsets differ in these languages, given the same structure
>layout! Look at the structure maps, which are hopefully included in your
>compiler listings. If not, you can switch them on with a compiler option.
>
>Regards
>
>Bernd
>
>
>
>Am Don, 16 Jan 2003 schrieben Sie:
>>
>> Hi
>>
>> Has anyone how to get dclgen, to add offsets into PL/ 1 copybook. By
that I
>> mean some thing this
>>
>>
>>
>> DCL 1 DCLSP_OFJAR,
>> 5 SPOFJ_BANK CHAR(4), /* 1 - 4 */
>> 5 SPOFJ_HBOK CHAR(2), /* 5 - 6 */
>> 5 SPOFJ_RNUM CHAR(6), /* 7 - 12 */
>>
>>
>>
>> If not possible by dclgen itself is there an exit in dclgen so this
process
>> can be performed by dclgen? Is there another way?
>>
>>
>>
>> Johannes Gislason
>> Icelandic Banks Data Centre
>> Kalkofnsveg 1
>> 150 Reykjavik
>> Iceland
>> tel. +354 5698877
>> fax +354 5622470
>>
>> --------------------------------------------------------
>>
>>
>>
>> Þessi tölvupóstur ásamt fylgiefni getur verið trúnaðarmál aðeins ætlaður
>> þeim, sem hann er sendur til. Öll önnur notkun er óheimil og vísast til
>> laga um fjarskipti nr. 107/1999, 2. mgr. 44 gr. Efni tölvupóstsins er á
>> ábyrgð sendanda ef það tengist ekki starfsemi Reiknistofu bankanna.
>>
>>
>>
>> This e-mail and its attachments may contain confidential information only
>> intended for the addressee. If you are not the intended recipient of
this
>> e-mail please advise the sender and delete this e-mail from your system
>> without making a copy or duplicate of any kind.
>>
>>
>>
>
>----------------------------------------
>Content-Type: text/html; name="unnamed"
>Content-Transfer-Encoding: quoted-printable
>Content-Description:
>----------------------------------------
>
>
>
the DB2-L webpage at http://listserv.ylassoc.com. The owners of the list
can

You could even avoid the query in a program, using DESCRIBE or DESCRIBE
TABLE to build the declarations as you want them. DCLGEN is fairly simple
and there are no exits.

Roger Miller