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

How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2717


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

705


Give some examples of command terminators?

749


Name the sections present in data division.

693


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

764






Write a cobol program making use of the redefine clause.

721


i need a small 3d program using inline and outline.

1629


How do define dynamic array in cobol.

663


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

634


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

701


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1103


What are the access modes of START statement?

706


What is link edit in cobol?

730


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

632


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1948