|
Yes you can James........... Here is an example of SST out parts of a field, in this case it is a date field. A***************************************************************** A* A R TR01R PFILE(TR01) A TEXT('TIME-TRANSACTION File') A TRMNTS R A TRTNNO R A TRTYPE R A TRGPTP R A TRSHFD R A TRSHIF R A TRSSHF R A TRGROP R A TRCDSH R A TRCDLN R A TRPAYT R A TRLABT R A TRCRGP R A TRBDGN R A TRBDG2 R A TREMPN R A TREMP2 R A TRSUPN R A TRSUP2 R A TRLDPT R A TRPDPT R A TRVDPT R A TRACTI R A TRATID R A TRACTO R A TRATOD R A TRADTI R A TRADID R A TRADTO R A TRADOD R A TRHRWK R A TREFPC R A TRSTDH R A TRORNO R A TROPNO R A TRPNNO R A TRDESC R A TRQYGD R A TRQYBD R A TRCMPC R A TRMNID R A TRMNDT R A TRMNTM R A TRPRTP R A TRLBTP R A TRTMPR R A TRTMAP R A TRADTT R A TRSRAP R A TRSDAP R A TRSAID R A TRSADT R A TRSATM R A TRRADD R A TRCADD R A TRSEQN R A TRLCKD R A TRBACC R A TRFACT R A TRVERS R A TRAPPD R A TRAPPT R A TRAPID R A TROTNN R A TRMCUO R A TRJBCD R A TRJBST R A TRSBL R A TRSBLT R A TRP001 R A TRP002 R A TRP003 R A TRP004 R A TRNUMB R A TRSHCD R A TRREAC R A TREQCG R A TREQWO R A TRPOS R A TRTXT1 R A TRTXT2 R A TRWRK1 R A TRWRK2 R A TRWRK3 R A TRWRK4 R A TRWRK5 R ================================================================== THE FOLLOWING IS WHAT YOU NEED FOR YOUR LOGICAL FILE. ================================================================== * * The field TRSHFD is a date field with CCYYMMDD (20010801). * * Substring out the century and year from TRSHFD. A FCCYY I SST(TRSHFD 1 4) * * Substring out the month and day from TRSHFD. A FMMDD I SST(TRSHFD 5 4) * * Sort by MMDD first and then the CCYY. A K FMMDD DESCEND A K FCCYY I hope this will help you. Jim -----Original Message----- From: James Rich [mailto:james@eaerich.com] Sent: Thursday, August 08, 2002 3:39 PM To: midrange-l Subject: substring date fields in logical files I have a physical file that contains a date field in it. I want to create a logical file over it that is keyed by just the year and month portion of the date field. The DDS manual tells me that I can't use SST on date fields. Anyone know a way I can create a field in a logical file that is a portion of a date field? James Rich _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.