>> Well, Enterprise COBOL V6.x now has functions... Cheers for Enterprise COBOL. We have VSE COBOL. ;-)
Sincerely, Dave Clark -- int.ext: 91078 direct: (937) 531-6378 home: (937) 751-3300 Winsupply Group Services 3110 Kettering Boulevard Dayton, Ohio 45439 USA (937) 294-5331 On Fri, Feb 13, 2026 at 12:30 PM Farley, Peter < [email protected]> wrote: > Well, Enterprise COBOL V6.x now has functions BIT-OF and BIT-TO-CHAR, so > COBOL programmers DO have SOME bit manipulation capabilities, though they > are a little crude. > > Example: > > 01 FUNC-COMMAREA. > 05 FUNC-LENGTH PIC S9(4) COMP-5. > 05 FUNC-FLAGS REDEFINES FUNC-LENGTH PIC X(2). > 05 FUNC-OTHER-DATA PIC X(whatever). > > MOVE FUNCTION BIT-TO-CHAR (‘1010101001010101’) TO FUNC-FLAGS. > > Obviously it would be nicer to be able to define actual BIT-level flags in > the redefine of the length field, but it is not impossible to set this up > to work from COBOL to your subroutine. > > Peter > > From: IBM Mainframe Assembler List <[email protected]> On > Behalf Of David Clark > Sent: Friday, February 13, 2026 11:03 AM > To: [email protected] > Subject: Re: [External Sender] Re: Maintaining Backward Compatibility > > >> Or - better - ask marketing for *their* solution... > > Ha! I like that one. > > >> Can you restrict the scripting request code to 7 bits? > > It would have to be 6 bits -- the leftmost bit is reserved for the sign and > the right-most bit of the top byte is reserved for a length of exactly 256 > (b'10000'). But, 6 bits do give me 63 combinations. So, yes, I could > create flags for 16 possible request codes and the 8 possible return codes > out of that. However, this subroutine was originally intended to help > COBOL programmers perform string functions not directly supported by > COBOL. A calling COBOL program would have a difficult time setting those > request codes and checking those return codes. > > >> Or - if not - can you add a flag at the end to delineate the new format. > > Now you're talking about creating a separate 260-byte work area to > transform the scripting parameter layout into a 3rd layout that would more > easily support both runtime modes. If this subroutine were only going to > be used in batch, then I could dynamically allocate that storage and be "in > like Flynn", as it were. But I don't think I should do the same in a CICS > partition. > > Sincerely, > > Dave Clark > -- > int.ext: 91078 > direct: (937) 531-6378 > home: (937) 751-3300 > > Winsupply Group Services > 3110 Kettering Boulevard > Dayton, Ohio 45439 USA > (937) 294-5331 > > > On Fri, Feb 13, 2026 at 10:39 AM Alan Atkinson <mailto: > [email protected]> > wrote: > > > If you have a halfword for a 256 byte string you have 8 flags for new > > formats in the top byte. > > Can you restrict the scripting request code to 7 bits? > > > > Or - if not - can you add a flag at the end to delineate the new format. > > > > Or - better - ask marketing for *their* solution... > > > > On 2/13/26, 10:32 AM, "IBM Mainframe Assembler List on behalf of David > > Clark" <[email protected] <mailto: > > mailto:[email protected]> on behalf of mailto: > [email protected] > > <mailto:[email protected]>> wrote: > > > <Snipped> > > This message and any attachments are intended only for the use of the > addressee and may contain information that is privileged and confidential. > If the reader of the message is not the intended recipient or an authorized > representative of the intended recipient, you are hereby notified that any > dissemination of this communication is strictly prohibited. If you have > received this communication in error, please notify us immediately by > e-mail and delete the message and any attachments from your system. >
