I need a field that is the substring of the original field but still have the same length in order for override...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
to work. As an example, I can build a temporary access path for what I need using OPNQRYF,but I can't make it permanent because DDS does not allow me to define length for a field that is a SST of another field. Can you help?
PGM OVRDBF FILE(file1) SHARE(*YES) OPNQRYF FILE((file1)) OPTION(*INP) + KEYFLD((*MAPFLD/fld1)) + MAPFLD((fld1 '%SST(1/fld1 1 2)' *CHAR(6)) CALL PGM(pgm1) CLOF OPNID(file1) DLTOVR FILE(*ALL) ENDPGM
Without knowing more about your DDS and particular application, I'm not sure I can make a good suggestion about how to fix your OPNQRYF statement but it sounds as if you are only using the OPNQRYF to substring a new field from an existing field anyway. You can make a field in your logical file that is based on a substring of an existing field and then you could skip the OPNQRYF completely. Here is an example of how you would do that. In this example, field TSTSST is an input only field based on field TSTFUL that begins at position 4 of field TSTFUL and then uses 2 characters of the TSTFUL field.
Ex. A R ILCTSTFM PFILE(TSTFIL) A TSTFUL A TSTNAM A TSTADR A TSTUSR A TSTDAT A TSTTIM A TSTSST I SST(TSTFUL 4 2) A K TSTSST A K TSTUSR A K TSTDAT A K TSTTIM
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.