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


Please Help Members By Posting Answers For Below Questions

Write a program that uses move corresponding.

673


What is the difference between structured cobol programming and object alternativelyiented cobol?

755


Discuss about changing dataset name in proc.

763


How many bytes S(8) comp field occupy and its maximum value?

1634


What is the difference between Global and External Variables?

666






What is the difference between PIC 9.99 and 9v99 in COBOL?

732


What are different data types in cobol?

691


Name the divisions, which are available in a cobol program?

685


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

712


Give some examples of command terminators?

759


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1773


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

710


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2105


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

825


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

677