how can i use the parameters decalred in main pgm in sub pgm
Answers were Sorted based on User's Feedback
Answer / venkat
specify the field as GLOBAL.
EX.
Main program
WSS.
01 WS-ENO PIC X(9) GLOBAL.
Sub program.
PD.
DISPLAY WS-ENO.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / lakshmisudha
if we defined the variables in main program like below
data division
working-storage section.
01 a1 pic 99.
01 a2 pic 9(3).
if you want use same variables in sub program you define
like below in sub program
DATA DIVISION.
LINKAGE SECTION.
01 B1 PIC 99.
01 B2 PIC 9(2).
PROCEDURE DIVISION USING A1, A2.
| Is This Answer Correct ? | 3 Yes | 0 No |
AM HAVING A FILE WHICH CONTAIN 12 DATS OUT OF WHICH 4 ARE DUPLICATES HOW TO REMOVE THE DUPLICATE FILES IN JCL? CAN I GET THE PROGRAM FOR THIS
How different is the JCL executing a COBOL program? 1) if the program is using VB file as input. 2) if the program is using FB file as input.
Is their any limit for data sets?
can i sort packed decimal if i can tell the syntax
How to search strings in multiple dataset with conditions 'string1 & string2'?
I have a sequential file in which there are 50 records. Now I want to copy all the 50 records in the reverse order into a new file? The last record in the original file should be the first record in the new file. How can I do it?
How can I write the joblog in the spool on normal end of a job step and direct the joblog to a dataset only if the step abends?
What is the use of disp parameter?
How do you submit a JCL under CICS environment ?
What are hierarchy levels in jcl?
how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data from mainprogram but i need it from JCL directly
i have two flat files.i want to select one record from that file by using jcl.for example file1 contains emp no,name,joining date. file2 has same details.emp no is primary key. i will give empno.that emp details send to outfile.please let me know if any one knows it.give sample code.