Date format with PIC s9(07)

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
shrutijain1984
Member
Posts: 3
Joined: Tue May 17, 2011 10:51 am

Date format with PIC s9(07)

Post by shrutijain1984 » Fri Oct 14, 2011 12:33 pm

Hi,

Could you please let me know how the date will stored in the following variable

ws-date pic s9(07).

Will it be YYMMDD or will it be in Julian format YYYYDDD?

Please dont ask me to read manuals as I urgently need reply to this

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Oct 14, 2011 1:40 pm

which date?

your urgency has nothing to do with us.

you are being paid,
we are answering for free.

suggest you look for a new line of work.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Oct 14, 2011 7:21 pm

Could you please let me know how the date will stored in the following variable
Probably not. . . You need to look in the code that places a date in the field to see how the date is arranged. You may need to back up to the code where the date is initially placed in the field.

FWIW - forums do not do "urgent". . .
Have a good one

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Oct 15, 2011 4:05 pm

I suspect, it should be Julian.

PS. May be an answer you wanted to listen!
Regards,
Anuj

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun Oct 16, 2011 8:21 am

Might be Julian (yyyyddd or 00yyddd), might be a 6-digit Gregorian (0yymmdd or 0mmddyy) or something "custom" (xmmddyy/xyymmdd) where x = some magic code for which century). Lots of places did thngs like this to get around changing field lengths for y2k. . .
Please dont ask me to read manuals as I urgently need reply to this
I forgot to mention this before.
If it was easily available in some manual, we would surely have told you to look there. This will probably be in no manual except one that originated in your organization describing how this date is stored. With a bit of luck all dates are stored in the same format - otherwise each will need to be researched.

Unfortunately, the entire answer is in code or documentation on your system.
Have a good one

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