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
Answer / srinivas yadav
//SYSIN DD *
SORT FIELDS = COPY
EXCLUDE=(44,4,CH,EQ,C'WIPR')
/*
//
Is This Answer Correct ? | 13 Yes | 1 No |
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 |
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 |
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 |
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 |
How can a fb file convert to vb file using sort program?
what is DD statement is used in JCL?
Explain about ISPFTTRC
How to read records in reverse order in flat file?
if the submitter of a job wants to inform another user about the job completion, how can it be done?
What is SORT ? How do we eliminate duplicate records ? How do I select some records using SORT ?
A job has 150 steps i want to execute only 57th step
what is a null indicator in db2?
How can unused space allocation be returned to the system when a dataset is closed?
When cursor is not closed what is the error?
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
How many days does a job remain in spool