i have a sequencial file contains multiple records, i want
to extract one row which contains various fields like order
number,date,warehouse,.ect.. in to the another file by
accepting the order number from jcl. how can i do it. pls
help me..
Answer Posted / abhijit18in2002
Input file: ABCD.UTIL.SAMP has following records
Order Warehouse Place Date
10012,COMPUTER,INDIA,20090805
10013,COMPUTER,INDIA,20090805
10014,COMPUTER,INDIA,20090805
10015,COMPUTER,INDIA,20090805
10016,COMPUTER,INDIA,20090805
10017,COMPUTER,INDIA,20090805
//COUNTREC JOB ,'COUNT RECORDS',
// MSGCLASS=Q,CLASS=D,
// NOTIFY=&SYSUID
//STEP010 EXEC PGM=SORT,REGION=4096K
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=ABCD.UTIL.SAMP,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(1,5,CH,EQ,C'10015')
/*
SORTOUT :- Ouput in SPool
10015,COMPUTER,INDIA,20090805
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
) how do u code after getting data?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How do you reference the following file formats from cobol programs?
What is the Purpose of Pointer in the string?
Mention the guidelines to write a structured cobol program?
how can i see junk values in dclgen or in hostvariable of comp ?
What are literals?
Write a cobol program making use of the redefine clause.
How many sections are there in data division in COBOL?
What is rmode(any) ?
Explain how to differentiate call by context by comparing it to other calls?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
how do you reference the fixed unblock file formats from cobol programs