Current Time On Sort Record.

View All Questions

Ask a New Question

  Posted by Don - Current Time On Sort Record. :
We need to create a sortout record with just the record count, the current date and the current time.  The time parameter we used was TIMENS(24).  But that returned the time in military time (24 hours)  and we need it in clock time (12 hours).  TIMENS(12) adds the AM or PM to the clock time.  Is there a time parameter we can use to get just the clock time without the AM or PM?

Frank Yaeger Says:
All of the methods for getting the time with DFSORT functions or symbols returns 24-hour time except TIME(12x) and TIMENS(12).  However, you can use TIMENS(12) to get the 12-hour time with am/pm and then just use the first 6 characters.  Here's an example:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD 01
RECORD 02
RECORD 03
//SORTOUT DD SYSOUT=*
//SYSIN DD *
   OPTION COPY
   INREC BUILD=(1:TIMENS=(12))
   OUTFIL REMOVECC,NODETAIL,
     BUILD=(80X),
     TRAILER1=(COUNT=(M11,LENGTH=8),X,DATENS(4MD),X,1,6)
/*

SORTOUT might have:

00000003 20111118 111450  

If you need something more specific, show me the DFSORT job you're using and I'll show you how to modify it.

Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com    
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration                                                          
DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort    

Guest Says:
This is great. Thanks


Add your reply below ...



This site allows you to ask questions and get answers from various posters. You may also answer any posts if you feel like you have input to give. Feel free to ask for help with any new question you wish, but most of the questions here are tech related. You will find many questions and answers related to your Ipod or Ipod Nano, Itunes, audio and video converting, spyware or adware cleanup, pc or other computer questions, and even mainframe questions. Although these are the tech questions most often asked, you will find help on almost any computer or software related subject. Feel free to go to the main menu and review the posts already present, or feel free to ask your own question. (Some questions will be closed once the moderator feels they are sufficiently answered and that no other input is needed).

See All Tips        Iphone Apps


Your Name:

Your Reply:

Type in verification code:


Front Page

Spyware/Task Database

Computer Tips (Main Page)