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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
using cursor how can you fetch more than one record into a variable
List the various advantages of using jcl language?
How can we execute only one step in a job
22 Answers MAHINDRA, Mind Tree, Tech Mahindra,
I have 5 generations in my GDG. How do I code in the JCL to consider all the 5 versions of the GDG ?
How do you check the syntax of a JCL without running it?
A statement about PROCs is " In PROCs, Symbolic Parameters can be assigned on PROC and EXEC", BUT On which EXEC, (i) On the JCL's EXEC which is calling to PROC1. (Inside JCL, EXEC PROC1) (ii) or On the PROC's EXEC where it calls the PGM1. (Inside PROC, EXEC PGM=PGM1)
how can we pass external data to instream procedures
5 Answers IBM, Infosys, Ocwen,
On the DD statement, what is the main difference between creating a new sequential flat file and a partitioned dataset?
A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code?
What are the causes for S0C1, S0C4, S0C5, S0C7, S0CB abends ?
i have two flat files.i want to select one record from that file by using jcl.for example file1 contains emp no,name,joining date. file2 has same details.emp no is primary key. i will give empno.that emp details send to outfile.please let me know if any one knows it.give sample code.