If you are stuck with a packed MMDDYY date field, and need to create a logical access path by date over the file, you can break it down using the sub-string feature in DDS (see Figures 1 and 2). To do this you must first override its definition to zoned, because technically you cannot sub-string a packed numeric field. The SST keyword uses three parameters: the field name, the starting position, and the result length. The result must be defined as input only and is always character. Note also that because a record format containing an input only field cannot be shared with the physical file, you must list all of the other fields from the physical if you wish to use them.
Kathleen Kostuck Milwaukee, Wisconsin
TechTalk: Creating A Logical File Over a Packed M
Figure 1 Physical file definition
Figure 1: Physical File Definition ....1.... ....2.... ....3.... ....4.... ....5.... ....6.... ....7 A R RECORD A FLD1 3 0 COLHDG('FIELD #1') A FLD2 1 COLHDG('FIELD #2') A MMDDYY 6 0 COLHDG('DATE' 'FIELD') A K FLD1 ....1.... ....2.... ....3.... ....4.... ....5.... ....6.... ....7
TechTalk: Creating A Logical File Over a Packed M
Figure 2 Logical file by YYMMDD date
Figure 2: Logical by YYMMDD Date ....1.... ....2.... ....3.... ....4.... ....5.... ....6.... ....7 A R RECORD PFILE(FILENAME) A FLD1 A FLD2 A MMDDYY S A FLDYY I SST(MMDDYY 5 2) A FLDMM I SST(MMDDYY 1 2) A FLDDD I SST(MMDDYY 3 2) A K FLDYY A K FLDMM A K FLDDD ....1.... ....2.... ....3.... ....4.... ....5.... ....6.... ....7
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online