I have a input file.
Data like: ABCDEFGH....
i want out put file like
AB
BC
CD
DE....How can do this??

Answers were Sorted based on User's Feedback



I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / prakash

using inrec in sort utility , we can perform it.
//sysih dd *
sort fields = copy
inrec fields = (10:1,2, 13:2,2, 16:3,2)

(or)

using reference modification in cobol.

Is This Answer Correct ?    7 Yes 6 No

I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / sathish

//JOB CARD
//S1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SORTIN DD *
ABCDEFGH
/*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,HEADER1=(1:1,2,/,1:3,2,/,1:5,2,/,1:7,2)
/*

Is This Answer Correct ?    1 Yes 0 No

I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / sathish

//S1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SORTIN DD *
ABCDEFGH
/*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,HEADER1=(1:1,2,/,1:2,2,/,1:3,2,/,1:4,2)
/*

Is This Answer Correct ?    1 Yes 0 No

I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / mdv

Two step process:

1.

Input file:

ABCDEF

//sysih dd *
sort fields = copy
outrec fields = (1,2,78X,2,2,78X,3,2,78X,4,2,78X,5,2,78X)

Step 1 output file will be:

ABBCCDDEEF


2.

//STEP EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
ABBCCDDEEF

//OUT DD DISP=OLD,DSN=file-FB_lrec/80
//TOOLIN DD *
RESIZE FROM(IN) TO(OUT) TOLEN(80)


OUT DD dataset will have the required.

Thanks

HTH

Is This Answer Correct ?    1 Yes 0 No

I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / muttaiah

@satish:

YOu have 2 posts continuously, can you tell us all which
one will work(or both) fine.

Is This Answer Correct ?    0 Yes 0 No

I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / muttaiah

MDV:

If you are using this stmt
outrec fields = (1,2,78X,2,2,78X,3,2,78X,4,2,78X,5,2,78X)

Your LRECL for O/p File would 400

AB followed by 78 blanksBCfollowed by 78blanks....

Did you try the code which you placed there...

I'm not sure of 2nd step..

Is This Answer Correct ?    0 Yes 0 No

I have a input file. Data like: ABCDEFGH.... i want out put file like AB BC CD DE....How can d..

Answer / muttaiah

@Posted Person:
Can you exactly tell me what is your requirement so that i
can try to provide you a solution.

1rec: every 2 char's you want to write a records.

because As far as my knowledge there is no such utility to
get data in such a way. You have to write a cobol program
and use Joblib stmt. In order to accomplish this request.

If you want the cobol program let me know??

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More JCL Interview Questions

In JCL I have 5 steps,I need to execute 1st,2nd and 5th steps only,can any one answer me please?

2 Answers   TCS,


What is the use of disp parameter?

0 Answers  


What is STEPLIB, JOBLIB? What is it used for?

2 Answers  


How can we increment subscript and index?

1 Answers   CTS, IBM,


Is stepname is a MUST and should be unique also for each JOBSTEP ? or system can supply the stepname for a step which is not given a name by the programmer ?

6 Answers   IBM,






what is the difference between perform varying and perform

1 Answers  


describe the dd statement,its meaning,syntax and keywords?

1 Answers  


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

9 Answers   GE, Xansa,


What is the purpose of dd * statement in jcl?

0 Answers  


If Name is NOT given for a JOB statement, then will it give error or installation will supply it for the JOB ?

1 Answers   IBM,


Which dd parameters are required?

0 Answers  


If I update one or more members in a pds in the step 1, how can I reach these new contents to be used in the step 2 of the same job? To start a new job via intrdr is not satisfactory, because I must solve this problem in one job.

2 Answers   IBM,


Categories