I've one sequential file, That file contains millians of
Junk & CHAR recoreds example

File 1
,,,,,...,,,.....,.,.INFOSYS.....,,,,,,,,,,,WIPRO...........,
,...,..,.

My questions is : I want omit the 44th posstion to 4 CHAR
(WIPRO) remaining things I want output file (including Junk
CHAR also)...
How can we slove this problem & give me a syntax.
Please provide the result as soon as possible.

Answers were Sorted based on User's Feedback



I've one sequential file, That file contains millians of Junk & CHAR recoreds example ..

Answer / srinivas yadav

//SYSIN DD *
SORT FIELDS = COPY
EXCLUDE=(44,4,CH,EQ,C'WIPR')
/*
//

Is This Answer Correct ?    13 Yes 1 No

I've one sequential file, That file contains millians of Junk & CHAR recoreds example ..

Answer / vs kumar

HI LU,

YOU HAVE MISSED THE SORT FIELDS = COPY
I HAVE CORRECTED IT. PLEASE LET ME KNOW IF I AM WRONG

//EXAMP JOB A400,PROGRAMMER
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=INP1,DISP=old
//SORTOUT DD DSN=OUTPUT,DISP=(,PASS),UNIT=3390,
// SPACE=(CYL,(5,1)),DCB=(LRECL=??)
//SYSIN DD *
SORT FIELDS = COPY
OMIT COND=(44,4,CH,EQ,C'WIPO')

Is This Answer Correct ?    5 Yes 1 No

I've one sequential file, That file contains millians of Junk & CHAR recoreds example ..

Answer / lu

//EXAMP JOB A400,PROGRAMMER
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=INP1,DISP=old
//SORTOUT DD DSN=OUTPUT,DISP=(,PASS),UNIT=3390,
// SPACE=(CYL,(5,1)),DCB=(LRECL=??)
//SYSIN DD *
OMIT COND=(44,4,CH,EQ,C'WIPO')

Is This Answer Correct ?    3 Yes 1 No

I've one sequential file, That file contains millians of Junk & CHAR recoreds example ..

Answer / pkb

This can be done using SORT utility
//STEP1 exec PGM=SORT
//STEPLIB ........
.....................
//SORTIN dd DSN=INPUT.FILE
...
//SORTOUT DD DSN=OUTPUT.FILE
...
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,73,74,10)
//SYSOUT DD SYSOUT=*

THE FILE LENGTH IS CONSIDERED AS 83

Is This Answer Correct ?    0 Yes 0 No

I've one sequential file, That file contains millians of Junk & CHAR recoreds example ..

Answer / naga

i think , WIPRO is 5 chars not 4 chars.

pls check the blow syntax.

SORT FIELDS = COPY
OMIT COND=(44,5,CH,EQ,C'WIPRO')

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

Can we delete the data using IEFBR14 , IEBGENER??

5 Answers   Kanbay,


how can we override data definitions in jcl. can any one give detailed example

3 Answers   TCS,


Explain about REXX

1 Answers  


what happens in conversion stage in job processing?

0 Answers   IBM,


wht r different types of sort fields in jcl ?

1 Answers   IBM,






can i sort packed decimal if i can tell the syntax

1 Answers   Barclays,


What are the utility programs in jcl?

0 Answers  


I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?

0 Answers  


how to split a file

4 Answers   IBM,


What is the difference between IEBGENER, IEBCOPY and REPRO in IDCAMS utility?

8 Answers   Accenture, TCS,


How to identify where file is empty or not? How many ways are there to identifying?

3 Answers   CTS,


How do you handle empty files in a JCL ?

3 Answers   Wipro, Xansa,


Categories