Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Is it possible to declare a GDA for an external subroutine?

Answers were Sorted based on User's Feedback



Is it possible to declare a GDA for an external subroutine?..

Answer / jamil ahmad

YES. A GDA can be used in an external subroutine. Thats
where a GDA comes in real handy. I personally rather use a
subprogram but developers use subroutine and like it. You
dont have to pass any parameter but you must use the GDA.
Upon returning from the subroutine you can interrogate the
glbal fields for your edits. Here is an example of an
external subroutine (chopped off to fit here): (I didnt
write this but use it all the time, works perfect)
DEFINE DATA
GLOBAL USING DSLGLOB
LOCAL
1 #NAME (A15) INIT <' '>
1 REDEFINE #NAME
2 #ARRAY (A1/15)
1 #X (N2)
1 #LENGTH (N2)
1 #BLANK (A1) INIT <'N'>
END-DEFINE
***********************************************
DEFINE SUBROUTINE NAME-EDIT
***********************************************
ETC ETC

END-SUBROUTINE

Is This Answer Correct ?    3 Yes 1 No

Is it possible to declare a GDA for an external subroutine?..

Answer / dd

One can not declare/create GDA in an external subroutine,
instaed it can use the GDA that is present in main calling
program.

Subprograms even don't have access to GDA. As they only need
the parameter data area to communicate with the calling program.

If a module of type program(P1) is calling another module of
Program(P2) using Fetch return then P2(the called program
module) can't have GDA defined in it.
But with fetch both can have GDA variables.

Is This Answer Correct ?    4 Yes 4 No

Is it possible to declare a GDA for an external subroutine?..

Answer / ganesh.b.s

An external subroutine can access the global data area used
by the invoking object(Program, Subprogram)
Moreover, parameters can be passed with the PERFORM
statement from the invoking object to the external
subroutine. These parameters must be defined either in the
DEFINE DATA PARAMETER statement of the subroutine, or in a
parameter data area used by the subroutine. Programs,
Subprograms and Subroutines Programming Guide
In addition, an external subroutine can have its local data
area, in which the fields that are to be used only within
the subroutine are defined.
However, an external subroutine cannot have its own global
data area.

Is This Answer Correct ?    4 Yes 6 No

Is it possible to declare a GDA for an external subroutine?..

Answer / niki

No its not possible to declare gda for external subroutine,
because external routine contains only logic not the data
variables. the external subroutine will lookmlike this

define subroutine-1.
........
.......
end-subroutine.

there is no define data bolck as such

please correct me if i am wrong.

Is This Answer Correct ?    1 Yes 17 No

Post New Answer

More Natural Interview Questions

Can we update with histogram?

2 Answers  


Explain the difference between external subroutine and subprogram?

0 Answers  


Explain adabas basic concepts. Like inverted list, address converter ,data storage?

0 Answers  


You are processing an input file in a Natural program and you want the program to fail if the file is empty. What command you use in Natural to force it to fail ?

6 Answers   IBM, TCS,


what is the difference between read and find ?

2 Answers   IBM,


How to receive data passed through jcl parm parameter in a natural program? How data definition is defined in the program?

0 Answers  


How to receive data passed through jcl parm parameter in a natural program?

0 Answers  


how many work file we can code in jcl?

2 Answers  


difference between read(1) and read work file once ?

3 Answers  


Suppose you are processing an input file in a natural program and you want the program to fail if the file is empty. What command you use in natural to force it to fail?

0 Answers  


What exactly is a hyperdescriptor? How does it work?

3 Answers  


Does Natural online require CICS or other TP systems to function? How does Natural interact with CICS? Thanks.

1 Answers  


Categories