View previous topic :: View next topic
|
Author |
Message |
Baskaran Warnings : 1 New User
Joined: 24 Oct 2006 Posts: 32 Location: India
|
|
|
|
i have easytrive program: which uses a copybook with folowing structure can any one explain what these declaration means?
GNRLSCTN 00001155A
GROUP*NO 00017005N0
GROUP*TYPE00039003N0
GRPNCHKDGT00024001N
GRPNMBR 00017007A
HD*INT 00100004P0
HD*INT*X 00100004A
............ |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Would u please use tab or spaces in ur code rather than putting them as a continuous string so that we can understand this |
|
Back to top |
|
|
Baskaran Warnings : 1 New User
Joined: 24 Oct 2006 Posts: 32 Location: India
|
|
|
|
hI Ekta,
I belive this is a sort of varible declaration,I wanted to know what is 00001155A? and 00017005N0? and so on , can you explain me?
GNRLSCTN 00001155A
GROUP*NO 00017005N0
GROUP*TYPE00039003N0
GRPNCHKDGT00024001N
GRPNMBR 00017007A
HD*INT 00100004P0
HD*INT*X 00100004A |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
Is there is no space in between 00001155A? |
|
Back to top |
|
|
Baskaran Warnings : 1 New User
Joined: 24 Oct 2006 Posts: 32 Location: India
|
|
|
|
Ektha,
You can read those declaration as below
GNRLSCTN 00001155A
GROUP*NO 00017005N0
GROUP*TYPE 00039003N0
GRPNCHKDGT 00024001N
GRPNMBR 00017007A
HD*INT 00100004P0
HD*INT*X 00100004A
i think now you can read it.. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
It says that GNRLSCTN field start with first byte & it is alphabatic
GROUP*NO fields start with 17 byte & 5byte long & it is numeric like
decimal(5,0)
Hope it is clear now |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I should look like this
Code: |
GNRLSCTN 00001 155 A
GROUP*NO 00017 005 N 0
GROUP*TYPE 00039 003 N 0
GRPNCHKDGT 00024 001 N
GRPNMBR 00017 007 A
HD*INT 00100 004 P 0
HD*INT*X 00100 004 A |
|
|
Back to top |
|
|
Baskaran Warnings : 1 New User
Joined: 24 Oct 2006 Posts: 32 Location: India
|
|
|
|
Hi Thomson,
Thanks a lot,I need more help from you,i could see an increment for variables 1 to 3 in bytes but for the 4 th item i again decreased. from 39 to 24.
more over for the first item it starts frm 1st byte for 155 A how he arrived at 17 for second item.
1.GNRLSCTN 00001 155A
2.GROUP*NO 000170 05N0
3.GROUP*TYPE 0 00390 03N0
4.GRPNCHKDGT 00024 001N
5.GRPNMBR 00017007A
6.HD*INT 00100004P0
7.HD*INT*X 00100004A |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
Quote: |
Thanks a lot,I need more help from you,i could see an increment for variables 1 to 3 in bytes but for the 4 th item i again decreased. from 39 to 24. |
Order soes not mandatory but u can take it as GNRLSCTN is group item & in ur program u want to access field which start from 17 byte & offset is 5 then u can use GROUP*NO |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I have no idea where you got these numbers, but the first is the displacement from the front of the record.
The second it the field length.
The third is the field type and the fourth is the number of digits behind the decimal.
Having them out of order is not good and could result in a compile error.
Quote: |
more over for the first item it starts frm 1st byte for 155 A how he arrived at 17 for second item. |
With EZT, you do not have to specify all the fields, the field at 17 was the first of interest. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Bill,
Quote: |
Having them out of order is not good and could result in a compile error. |
Why we will get compilation error |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
guptae wrote: |
Quote: |
Having them out of order is not good and could result in a compile error. |
Why we will get compilation error |
I just recalled an error I got when I miss-ordered some defines. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Bill,
i think we should not get compilation error for this but i cant test it as we dont have easytrieve in our shop |
|
Back to top |
|
|
|