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



I have DATE filed like DD-MM-YYYY, So I want output should be MM/DD/YYYY using JCL? Can anybody..

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

I have DATE filed like DD-MM-YYYY, So I want output should be MM/DD/YYYY using JCL? Can anybody..

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

I have DATE filed like DD-MM-YYYY, So I want output should be MM/DD/YYYY using JCL? Can anybody..

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

I have DATE filed like DD-MM-YYYY, So I want output should be MM/DD/YYYY using JCL? Can anybody..

Answer / raghuvanshi

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

Post New Answer

More JCL Interview Questions

Define concatenating?

0 Answers  


Describe the JOB statement, its meaning, syntax and significant keywords?

1 Answers  


Explain how can the submitting users racf authority be overridden in a job stream?

0 Answers  


My JCL contains four steps //STP1 A(+1), DISP = NEW //STP2 A(+2), DISP = NEW //STP3 A(+3), DISP = NEW //STP4 A(+1), DISP = OLD STP3 was abended and I want restart my JCL from STP3 onwards & what are the precaution I want to take & what are the changes I need to make. Pls let me know.

4 Answers   CTS,


what is the difference between perform varying and perform

1 Answers  






A dd statement consists of 4 fields. Name them?

0 Answers  


Explain about ISPF/TSO Commands

0 Answers  


What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?

2 Answers  


how you will the direct the data to spool using sysout option?

0 Answers   IBM,


What is the purpose of dd?

0 Answers  


A. Job Abended in STEP03. Now run job again to execute STEP03, STEP04 (STEP01,STEP02 should not execute again)

3 Answers   Cap Gemini, CSC, Xchanging,


Suppose I have seven jobs to do, but I want to hold one than how can I do this?

1 Answers  


Categories