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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

851


when can a job time-out occur? How to overcome that?

751


How can the attributes of one sms dataset be copied to another dataset?

846


How can unused space allocation be returned to the system when a dataset is closed?

804


Which statement is used to identify the private libraries in job?

674






What parameters can be used to limit the number of records written to a sysout dataset?

746


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

1797


How can a fb file convert to vb file using sort program?

802


What is concatenating?

633


which parameter is used to check the syntax of a jcl without executing it?

795


How is the record format of an output dataset specified?

743


what is JCL?

691


A dd statement consists of 4 fields. Name them?

921


1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat

7076


Explain the function of the dd dcb keyword?

694