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 |
What are the default system and catalog libraries in JCL?
Does the terms, JOBLOG, SPOOL and SYSOUT indicate the same thing, i.e., where JCL and JES messages and statements are written ?
I have a job which is a long-running one. Processes millions of records. Due to some run-time problem (not a problem due to the job/data) the job abends.What needs to be done to make the job complete successfully.
can i sort packed decimal if i can tell the syntax
How to release the Output HELD by using HOLD = YES on DD statement ?
wht happens if blksize = 0 and lrec = 0 ?
If there are five steps in a JCL i have to execute the 3rd step, bypass the 4th step and execute the 5th step how do i do this?
13 Answers Cognizant, Convergys, IBM, TCS, Wipro,
What is the use of the utility DFSRRC00 in the JCL?
I have four steps in jcl they are STEP1,STEP2,STEP3 and STEP4. Can it possible to run the reverse order like step4 first then step3,step2,step1?
How to execute step2,step1, step3 if step1,2,3 are in order
What statement marks the end of an in-stream or catalogued procedure?
What is DISP= (NEW,PASS,DELETE)?