COBOL - REDEFINES clause

cobol interview questions

Moderator: Moderator Group

Post Reply
wence
Member
Posts: 1
Joined: Wed Apr 30, 2014 2:00 pm

COBOL - REDEFINES clause

Post by wence » Wed Apr 30, 2014 2:03 pm

I have a string of size 36 which has the value "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"
Now using REDEFINES i have to print this in reverse. how to do it.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Wed Apr 30, 2014 8:47 pm

OCCURS. PIC XXX. INDEXED BY (or use a numeric field as a subscript). Start "at the back", ie from 12, and go down until all are printed.

The obscure modern way is with reference-modification.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others