> From: Walden H. Leverich > > Ideally, I'd like to do the following (the real code has >40 parms): > > DP1PARM ds > D P1BCST 1 > D p1bbnb 5p 0 > D p1bdst 1 > C *entry plist > C parm p1bcst > C parm p1bbnb > C parm p1bdst > C call 'cblpgm' > C parm p1parm > > > But I don't seem to be able to pass subfields as parms. This should work: put your subfields into factor 1 of each parm statement. Use like defined fields for your actual parms. This will cause the contents of the passed parameter to be copied into the subfield: D PIBCST s like(P1BCST) D PIBBNB s like(P1BBNB) C *ENTRY PLIST C P1FLD1 PARM PIBCST C P1FLD2 PARM PIBBNB Notice that the actual parameter field name starts with "PI" rather than "P1"; that seems to work with your naming conventions.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.