Hi,
I have 3 files say file A , file B and file C.I want to
form an output file in which i will have all the records
from file A. Files B and C also may contain records that
are present in file A.I want those records also to be
included in my output file.
for eg:
file A contains:
1
2
3
file B contains:
2
4
5
file C contains:
1
3
5
So in my output file should look like:
1
2
3
2
1
3
Can any one help ???.....thanks in advance.
Answers were Sorted based on User's Feedback
Answer / saikishore
I don't know what are you going to tell in your questions.
I am giving the solution according to your example.
STEP1: JOIN FILEB, FILEC.
//SYSIN DD*
JOIN FILES=F1,FIELDS=(1,1,A)
JOIN FILES=F1,FIELDS=(1,1,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,1,F2:1,1)
INCLUDE COND=(1,1,CH,EQ,C' ',AND,2,1,CH,EQ,C' ')
SORT FIELDS=COPY
/*
STEP2:
//SORTIN DD DSN=FILEA,DISP=SHR
// DD DSN=OUTPUT FILE OF STEP1,DISP=SHR
//SORTOUT DD DSN=FILE6, <- GIVE ALL THE PARAMETERS
//SYSIN DD *
SORT FIELDS=COPY
/*
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / murali
@sai Kishore: I'm not able to understand what will be the
output of step1..
Can you please explain the JCL stmts in step1 line by line.
Is This Answer Correct ? | 0 Yes | 0 No |
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.
WORKING-STORAGE SECTION. 1 GROUP-ITEM. 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50. 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP. PROCEDURE DIVISION. MOVE ZERO TO GROUP-ITEM. ADD 50 TO AMOUNT-1. DISPLAY AMOUNT-1. STOP RUN.
Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ?
after submiting the jcl.how do you know that the job has been completed.
Explain how can an in-stream dataset be terminated?
Can an individual step be restricted from using all the jobs allowed cpu time?
A. Job Abended in STEP03. Now run job again to execute STEP03, STEP04 (STEP01,STEP02 should not execute again)
3 Answers Cap Gemini, CSC, Xchanging,
can we maintain 2 generations with different Lengths in Same GDG ?
what is pupose and meaning of the REGION keyword and what jcl statement is it associated with?
how to convert fb to vb in jcl ?
Suppose your program is reading a Sequential Vsam file. The file contains 10 records. How will you code the JCL to read only 2nd, 5th, 7th,and 10th record?
what is JCL?