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 |
Can we delete the data using IEFBR14 , IEBGENER??
how can we override data definitions in jcl. can any one give detailed example
Explain about REXX
what happens in conversion stage in job processing?
wht r different types of sort fields in jcl ?
can i sort packed decimal if i can tell the syntax
What are the utility programs in jcl?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
how to split a file
What is the difference between IEBGENER, IEBCOPY and REPRO in IDCAMS utility?
How to identify where file is empty or not? How many ways are there to identifying?
How do you handle empty files in a JCL ?