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

How can a fb file convert to vb file using sort program?

0 Answers  


what is DD statement is used in JCL?

0 Answers  


Explain about ISPFTTRC

1 Answers  


How to read records in reverse order in flat file?

1 Answers  


if the submitter of a job wants to inform another user about the job completion, how can it be done?

0 Answers   IBM,






What is SORT ? How do we eliminate duplicate records ? How do I select some records using SORT ?

9 Answers   GE, Xansa,


A job has 150 steps i want to execute only 57th step

3 Answers   Cognizant,


what is a null indicator in db2?

5 Answers   Fiserv, IBM,


How can unused space allocation be returned to the system when a dataset is closed?

0 Answers  


When cursor is not closed what is the error?

3 Answers   IBM,


I am getting the file from Unix to Mainframes for every 15 minutes. The mainframe job get abended with bad records coming from unix. I recovered that by deleting the bad data. I need permenant solution how to fix the issue? The record is getting characters in in first 9 positions which it should not. Please provide me the solution how to skip the records if it finds the charcters in the first 9 positions. K

3 Answers  


How many days does a job remain in spool

7 Answers   Syntel,


Categories