View previous topic :: View next topic
|
Author |
Message |
shiva_suresh Warnings : 2 New User
Joined: 05 May 2005 Posts: 11 Location: Bangalore
|
|
|
|
1)How static calls nda dynamic call works when changes are made both in
main and sub programs?
2)A-9(35) ,B-9(35) is it posible to perform any operations on thes two?
3) A-X(10) ,B-9(5) is it possible to move datea from A to ?
4) There are two files A,B I want 3 output files using these two files?
5)what are organizations modes of KSDS & ESDS?
6)Different t upes of REAS statements?
Thanks in advance |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
2) yes it is possible if you set compiler option to 32-bit
3)you can move date a to b it is possible
4)use your cobol logic
5)indexed,sequential
thanooz |
|
Back to top |
|
|
shiva_suresh Warnings : 2 New User
Joined: 05 May 2005 Posts: 11 Location: Bangalore
|
|
|
|
1)Different types of READstatements? |
|
Back to top |
|
|
rssomm
New User
Joined: 05 Jun 2005 Posts: 41 Location: Hyderabad
|
|
|
|
Hi Shiva_suresh,
1) Static Call : If changes made to subroutine both Calling & subroutine should be compiled and if changes made to calling program only calling program should be recompiled.
Dynamic call : In changes made to subroutine no need to recompile calling program and if changes made to calling program only calling program need to recompile.
2) I am afraid it is not possible.
3)Possible, if A contains numeric value.
4)Use IEBGENER or SORT , Concatinate the datasets A and B.
5) & 6) Refer any COBOL book and let us know.
Instead of relying on others for readymade answers, please first put some effort from ur side, if you couldn't get answers then post your query in the forum. This will help u to improve.
Best of luck.
Thank U.
Madhu |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
hi
2) sorry for wrong answer i over look that i have seen i am expected 31
3) it is possible if a contains any value either numeric or alphanumeric
thanooz |
|
Back to top |
|
|
neosumit
New User
Joined: 20 May 2005 Posts: 1 Location: Mumbai
|
|
|
|
Hi All,
In case of
1. Static call : the called subroutine has to be present as a Linklib member which would then be included in the final loadmodule of the main calling program.
2. Dynamic call : the called subroutine resides as a loadmodule member of a loadlib.Hence in case of a dynamic call the two programs are present as 2 different loadlib members.
I hope its clear.
Thanks,
neosumit |
|
Back to top |
|
|
shivashunmugam Muthu
Active User
Joined: 22 Jul 2005 Posts: 114 Location: Chennai
|
|
|
|
Thanooz,
How cum u r saying that we can move alphanumeric to numeric? explain me please....
If its possible i want to understand..... |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
hI,
sHIVA
01 ZA PIC X(10) VALUE "ABCDEFGHIJ".
01 DA REDEFINES ZA PIC 9(5).
PROCEDURE DIVISION.
MOVE ZA TO DA.
DISPLAY DA.
THE OPUT OF THE ABOVE PROGRAM IS FGHI:
THANK,
THANOOZ. |
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi Shiv and Thannoz,
2) A-X(10) ,B-9(5) is it possible to move datea from A to ?
The answer You have given is not exactly correct in all the situations.
Ans. Data can Move from A to B only when A- X(10) contains only numeric values. also data truncation will be applied.
Bye,
Rathna.
thanooz wrote: |
hi
2) sorry for wrong answer i over look that i have seen i am expected 31
3) it is possible if a contains any value either numeric or alphanumeric
thanooz |
|
|
Back to top |
|
|
crrindia
Active User
Joined: 02 Jul 2005 Posts: 124 Location: Gurgaon
|
|
|
|
Hi Thanooz/Shiv,
The one which You have given an ex. is totally mistake. first of all how You move data from Alphabetic to Numeric. Please correct that.
Thanks,
Rathna
thanooz wrote: |
hI,
sHIVA
01 ZA PIC X(10) VALUE "ABCDEFGHIJ".
01 DA REDEFINES ZA PIC 9(5).
PROCEDURE DIVISION.
MOVE ZA TO DA.
DISPLAY DA.
THE OPUT OF THE ABOVE PROGRAM IS FGHI:
THANK,
THANOOZ. |
|
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
Hi crrindia
Have you chek it in your system wether it is giving any error.
I have checked that example in my system after words only i posted the answere. If it is giving any error in your system please post me.
Thanks,
thanooz. |
|
Back to top |
|
|
rssomm
New User
Joined: 05 Jun 2005 Posts: 41 Location: Hyderabad
|
|
|
|
I am very sad to see this type of discussion on REDEFINES. What ever the Variable names are used, they refer the same memory area. So It is meaningless to use the COBOL verb MOVE. It has no affect.
Some Conpliers may allow to use MOVE and Some may not. Concept should be understood clealy. It is some thing like a person being refered with 2 names.
Regards
Madhu |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Regarding Ques 3. Back to the orig ques:
The key to the solution is the following rule for numeric elementary receiving items:
When the sending item is alphanumeric, the data is moved as if the sending item were described as an unsigned integer.
So, if A pic X(10) [value 'ABCDEFGHIJ'] is moved to B pic 9(05) the result in B is 'FGHIJ'.
That agrees with what THANOOZ wrote (almost).
BTW, if B was defined as B pic 9(05)v99, the result would be 'FGHIJ00'. |
|
Back to top |
|
|
rssomm
New User
Joined: 05 Jun 2005 Posts: 41 Location: Hyderabad
|
|
|
|
hi Jack
Quote: |
BTW, if B was defined as B pic 9(05)v99, the result would be 'FGHIJ00'. |
I am afraid the answer is not correct. Where from we get zeros in last 2 positions?
Regards
Madhu |
|
Back to top |
|
|
|