Endevor

 View Only
  • 1.  Processor symbolic query

    Posted Nov 21, 2024 02:59 AM
    Edited by Danny Cheng Nov 21, 2024 09:12 PM

    I have the following condition for processor symbolic:
    CCID first char is 0-9, symbolic - XXX=@&C1CCID(2,7)
    CCID first char is A-Z, symbolic - XXX=&C1CCID

    It require to have "26 + 10" symbolic in processor.
    XXX="TEMP&C1CCID(1,1)"
    TEMP0=@&C1CCID(2,7)
    ....
    TEMP9=@&C1CCID(2,7)
    TEMPA=&C1CCID
    ....
    TEMPZ=&C1CCID
    May i know any better way to code the processor symbolic with this kind of condition?



  • 2.  RE: Processor symbolic query

    Posted Nov 22, 2024 06:59 AM

    Hi Danny,

    It's a shame that there is no way to have conditional IF THEN/ELSE processing for the PROC statement values, or that there are no functions like &DATATYPE(&CCID(1,1)) = N or A as in REXX.

    I can only think of 2 alternatives to your issue.
    1. This first one doesn't fix the issue but makes it less work. Make the TEMP0-9 and TEMPA-Z site symbolics, then you would not have to define them in every processor. 

    Or
    2. Put processing in Exit 2 to examine the CCID and then set a value in the 80 byte Element User Data field &C1EUDATA
    Exit 2 could contain logic something like this
    IF &C1CCID(1,1) = Numeric set &C1EUDATA  = "@&C1CCID(2,7)"
    ELSE Set &C1EUDATA = "&CCID"

    Your processor PROC statement could then contain
    XXX=&C1EUDATA(1,12)

    Hope that is useful.



    ------------------------------
    Jim Aggersbury
    ------------------------------



  • 3.  RE: Processor symbolic query

    Posted Nov 24, 2024 09:04 PM

    Hi Jim,

    Thanks for the information. 
    The input/output file will use CCID as one of dataset qualifier.  
    Testing CCID is free text (with condition 1st is char) and Normal CCID is 8 digi.
    So, it is hard to limit the site symbolic for user testing. I will further compare the "POS & CONS" EXIT2 or 36 symbolic.




  • 4.  RE: Processor symbolic query

    Broadcom Employee
    Posted Nov 23, 2024 06:19 PM

    Hey Danny

    Is it really a processor symbolic that you need? If your downstream references to the new symbolic have "//" in columns 1, then, yes you need a processor symbol, and Jim's suggestions deserve consideration. 

    On the other hand, if your downstream references to the new symbolic are within in-stream data, then there is an alternative.  If downstream references look like this:

    //INPUT   DD   *

        . . .

        . . .   &NEWVALUE

        . . .

    Then insert a step before the first reference and use embedded REXX to assign a value for NEWVALUE. Here is an example inserted step:

    000001 //CCIDEDIT EXEC PGM=IRXJCL,PARM=' '   <- Hex 00 in parm          

    000002 //SYSEXEC  DD *                                  

    000003   Trace R                                                        

    000004   char1 = Substr('&C1CCID',1,1)                                  

    000005   charType= DATATYPE(char1)                                      

    000006   IF charType = 'NUM' then NEWVALUE = Substr("&C1CCID",2)        

    000007   ELSE                     NEWVALUE = "&C1CCID"                  

    000008   Push "  CCID '" || NEWVALUE || "'"                             

    000009   "EXECIO 1 DISKW OUTPUT (Finis"                                  

    000010   Exit(0)                                                        

    000011 //*OUTPUT   DD SYSOUT=*   <- route as input to downstream step(s)

    000012 //OUTPUT   DD DSN=&&NEWVALUE,DISP=(NEW,PASS),                     

    000013 //            UNIT=SYSDA,SPACE=(TRK,(1,1)),                      

    000014 //            DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)               

    000015 //SYSTSPRT DD SYSOUT=*                                           

    Then the downstream reference can look something like this…

    //INPUT   DD   *

        . . .

    //        DD DSN=&&NEWVALUE,DISP=(OLD,PASS)

    //        DD   *

        . . .




  • 5.  RE: Processor symbolic query

    Posted Nov 24, 2024 09:06 PM
    Edited by Danny Cheng Nov 24, 2024 09:08 PM

    Hi Joseph,

    Thanks for information.
    Yes, it require to use in symbolic. I will further check for Jim's recommendation. 

    Will Broadcom add "conditional IF THEN/ELSE processing for the PROC statement values" in later version?