I have DATE filed like DD-MM-YYYY, So I want output should be
MM/DD/YYYY using JCL?
Can anybody post the answer for above requirement?
Answers were Sorted based on User's Feedback
Answer / harsha
12345678910
DD-MM-YYYY
Above is the date and column numbers.
//STEP1 EXEC PGM=SORT
// .
// .
// .
OPTION COPY
OUTFILE FNAMES=SORTOUT
OUTREC=(4,2,C'/',1,2,C'/',7,4)
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / mfgan
When DD-MM-YYYY is the first field of input record,
Then use the below code,
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,2,
3:C'/',
4:4,2,
6:C'/',
7:7,4)
/*
//
When others,
Change the position numbers occordingly.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / pranay
OUTREC FIELDS=(4,2,C'/',1,2,C'/',7,4)
The above Sort card is working perfectly fine for me.
Please recheck.
| Is This Answer Correct ? | 2 Yes | 0 No |
When I am using
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(4,2,C'/',1,2,C'/',7,4)
/*
//
I am getting the same output as input!
Can someone please through some light on it.
| Is This Answer Correct ? | 1 Yes | 1 No |
what is a jcl?
hi in one of the interview one asked me how to submit a job from cobol?as well as how to submit a jcl from CICS? can u pls any one tell me..
How do you handle empty files in a JCL ?
What is model dataset label(Model DSCB)?
what r the types of job control statements?
How to use COND Parameter in jcl
Could you provide an example and its effect OF, Using COND on JOB and EXEC both ?
how do you access an uncataloged dataset in a jcl?
Hi, can we call catalog( say myproc } proc n times in jcl if so how please explain Thanks in advance
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
Why include statement is used in a jcl?
Passing a variable parm from JCL to a cobol/db2 program