is this below syntax correct?
CALL 'subprg' using A,B
Please help
Answers were Sorted based on User's Feedback
Answer / lu
yes, ...look at this ex:
For calling sub-modules DYNAMICALLY - Code:
In Working Storage Section -
01 WS-PROGRAM PIC X(08).
MOVE 'SUBPROGA' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)
MOVE 'SUBPROGB' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)
MOVE 'SUBPROGC' TO WS-PROGRAM
CALL WS-PROGRAM USING ....(Your Parameters)
For Calling STATICALLY, check your compiler option. If it
is NODYNAM then use -
Code:
CALL 'SUBPROGA' USING ...(Your parameters)
CALL 'SUBPROGB' USING ...(Your parameters)
CALL 'SUBPROGC' USING ...(Your parameters)
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / billyboyo
Yes, your syntax is correct.
This is using the "call literal" option of IBM Cobol. If
you do need the call to be dynamic, specify the DYNAM
option on the compile.
If you were to have used "call data-name" then the call is
perforce dynamic and unaffected by DYNAM/NODYNAM compile
option.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?
why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.
we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?
I had 100 records and i want to execute last three records by using cobol programming?what will be coding?
How to pass return codes from cobol to jcl?
what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?
study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid
What is the difference between NEXT SENTENCE and CONTINUE?
how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please
01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2
A table has two indexes defined. Which one will be used by the SEARCH?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?