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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What dd statement is used to supply the name of a dataset?

769


how JCL works?

790


Explain the purpose of dd dummy statement?

665


Is it possible to left uncode disp?

706


I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?

8652






In sms datasets, what is the function of the dd avgrec keyword?

644


When space is allocated for an output dataset, what units can be used?

736


What is the function of the dd dcb keyword?

816


in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

2048


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

744


Name the parameters which can be used to limit the number of records written to a sysout dataset?

648


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

800


How to pass data to a program that is coded in an exec statement?

813


Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You

2258


Is acct parameter mandatory?

757