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

How jcl is used for testing batch programs?

0 Answers  


In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that???

10 Answers   Perot Systems,


How to do automated restart when a job abend?

0 Answers  


WHAT IS DUMMY IN JCL? HOW TO USE IT? CAN ANYBODY SEND PROGRAM ON THIS?

3 Answers  


What does S0C4 error mean?

8 Answers  






Where can program checkpoints be stored for use in a restart?

0 Answers  


COND -> step1 . . step2, Step2, Executes if the CC of step1 is 0. But even if it is NOT 0 and if we dont give COND, will step2 be executed ?

4 Answers   IBM,


when does a dataset go uncataloged?

0 Answers   IBM,


1)what is compilation jcl for cobol program but it is calling another program 2)what is compilation jcl for cobol program but it is calling another program(in this, main program is pure cobol but sub program is cobol+db2 program.can anyone please answer me for above questions. it's very urgent

4 Answers   Mind Tree,


Passing a variable parm from JCL to a cobol/db2 program

1 Answers   IBM,


i have a jcl containing header body and trailer .in header i have viswa body 2 6 1 9 7 trailer reddy .now i need to sort only body in either asecending or descending order how can i do it

1 Answers   L&T,


Please give me the coding for converting VB to FB and FB to VB

3 Answers   HP,


Categories