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 |
A file has dta in S9(09) COMP format. How do I move the data into a character field X(10)?
is step name is compulsory in jcl ?
Passing a variable parm from JCL to a cobol/db2 program
how can we merge two input files from two different jobs into one output file ? Please ans any one ASAP?
Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?
How to submit multiple jobs. These jobs are members in PDS. The second job should run if the first job runs successfully and so on.
after submiting the jcl.how do you know that the job has been completed.
Is condition checking possible in jcl? If yes, how?
We have 100 steps in a procedure and we need to run the jcl and execute only 25th step in the proc and not the remaining steps. How can we do it?
5 Answers IBM, JPMorgan Chase,
What 3 guidelines do we have to follow when concatenating DD statements?
Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step1, What changes have to be made in Step2, so that if the file in Step1 is empty Step2 should not be executed? No changes to be made to Step1.
What are the utility programs in jcl?