Write a JCL by using the below requirement:
File1 =1, File2 =11 and output needs to come as File3 =111?

Answer Posted / muttiah

@satish:

I'm not sure on what basis you have created this jcl. But
if i'm your interviewer i would have blasted you like
anything.

Findings:
1. step1 output will be 1 in postion 1 followed by 001 in
pos 60 - 62.
2. step2 output will be 111 in position 1-3 followed by 002
in pos 60-63. why the hell are you hardcoding sortin in
both the steps and sortout of step2 you are force fully
making it come as '111' because of this
OUTREC FIELDS=1:C'1',2:1
Then what is the case of having step1 if you force fully
making it as '111'..

Coming to step4: i'm not sure what does it mean but i
executed and saw like the output is in this format.
111 in pos 1-3 and 001 in pos 60-62.
Then where are you eliminating 001 in cols 60.

If you are not sure of the answer don't post anything. But
never divert people with your answers. People who are new
to mainframe can feel your answer is correct.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can return codes be tested before execution of a job step?

837


What do you understand by the term job time – out and how can you overcome that?

611


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

2002


How does jcl act on a cobol code?

661


Explain how can a stopped job be started again?

641






what is the use of IEBGENER utility?

665


Define concatenating?

675


Explain how can an in-stream dataset be terminated?

705


What methodology can be adapted to transfer data to a program that is coded using the exec statement?

620


What are steplib and joblib? What for they are used?

699


How to run cobol program using jcl?

661


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY

867


What is one line to pass PARM from JCL to COBOL?

1045


How can return codes be tested before execution of a job step?

932


how to compare two datasets without using superce because output is limited to 133 bytes

1489