How do you code Cobol to access a parameter that has been
defined in JCL?

Answers were Sorted based on User's Feedback



How do you code Cobol to access a parameter that has been defined in JCL?..

Answer / shan

Ff it is SYSIN input in JCL,
ACCEPT <VARIABLE> FROM SYSIN
If it parameter is give through PARM, then COBOL program
should recieve through LINKAGE SECTION

Is This Answer Correct ?    7 Yes 0 No

How do you code Cobol to access a parameter that has been defined in JCL?..

Answer / lynn ertell

Apparently you cannot use the ACCEPT verb against the
LINKAGE parameters if you are already using SYSIN.
It's either one or the other but not both.

Is This Answer Correct ?    0 Yes 0 No

How do you code Cobol to access a parameter that has been defined in JCL?..

Answer / harish

environemnt division

file1 assign to ddname
file2 assign to ddname

for this in JCL //DDNAME DD DSN.......

LINKAGE SECTION
01 LN-LEN PIC S9(4) COMP.
01 X PIC X
01 Y PIC X
IN JCL THROUGH PARM (MAX 1 TO 100 CHAR)

procedure division.

ACCEPT X
ACCEPT Y.

IN JCL THROUGH SYSIN DD*


pls correct me if anything wrong

HARISH POOMGAME SHIVAPPA(hassan,karnataka)
NIIT TECHNOLOGY
KOLKATA

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More COBOL Interview Questions

Which Search verb is equivalent to PERFORM…VARYING?

0 Answers  


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?

9 Answers   TCS, Tech Mahindra,


How do you define a sort file in JCL that runs the COBOL program?

6 Answers   Syntel,


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  






Explain how to differentiate call by context by comparing it to other calls?

0 Answers  


What is reference modification? What is UNION in sql and syntax? What is the difference between GDGS and VSAM? Which is prefer one? What is processing groups in endevor?

1 Answers   Kuwait Oil Company,


sample code for read a 2nd record from last in flatfile how can do?

4 Answers   iNautix,


.How to add one input & one Out file in existing cobol program. how approach tell me step by step.

2 Answers   Syntel,


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,


Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.

3 Answers   iGate,


If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it

7 Answers   BirlaSoft,


Categories