/*START OF SPECIFICATIONS****************************** REXX */ /* */ /* MEMBER-NAME = SUPC2CAM */ /* */ /* DESCRIPTIVE-NAME = SUPERC UPDATE0 Delta to CAMSERV UPDATE */ /* */ /* COPYRIGHT= */ /* */ /* Contains restricted materials of Phoenix Software */ /* International. Copyright ¸ 1979-2025 by Phoenix */ /* Software International. Licensed materials property */ /* of Phoenix Software International. */ /* */ /* FUNCTION = */ /* */ /* This REXX reads in a SUPERC UPDATE0 delta deck from */ /* the DELTA input DD and translates it into equivalent */ /* CAMSERV UPDATE control cards, which are then written */ /* to the CAMSERV output DD. */ /* */ /* PARAMETERS = */ /* */ /* One parameter is passed. It is the one-character type */ /* followed by the member name in the format expected by */ /* the CAMSERV UPDATE command. Example: */ /* */ /* A.MYPROG */ /* */ /* DD STATEMENTS = */ /* */ /* DELTA = this input DD contains the SUPERC UPDATE0 */ /* delta deck (DELDD) generated by comparing */ /* the old and new versions of the specified */ /* CAM library member using SUPERC. */ /* */ /* CAMSERV = this output DD contains the control cards */ /* to be input to CAMSERV in order to apply */ /* the changes identified by SUPERC. */ /* */ /* OPERATION = */ /* */ /* If you use the CAMSERV PUNCH utility to obtain the */ /* member, be sure to use the RECREMOV REXX to strip off */ /* the extra records inserted by CAMSERV before inputting */ /* the member to SUPERC. For example, in z/OS, the output */ /* written to SYSPUNCH appears this way: */ /* */ /* | ./ ADD SSI=D7C3C3C1,NAME=memname */ /* | first source statement */ /* | .. */ /* | .. source statements 2 through N-1 */ /* | .. */ /* | last source statement */ /* | ./ ENDUP */ /* */ /* Use the RECREMOV REXX to strip out the ./ ADD and */ /* ./ ENDUP statements being passed to SUPERC. */ /* */ /* */ /*END OF SPECIFICATIONS***************************************/ SUPC2CAM: parse arg memname if memname = "" then do say "**Error** Member Type.Name not provided" exit 12 end camservIx = 1 camserv.camservIx = " UPDATE" memname || ",,,NOSEQ" "EXECIO * DISKR delta (STEM delta. FINIS" do deltaIx = 3 to delta.0 select /* Select Control Card Type */ /* Insert */ when LEFT(delta.deltaIx,5) = "./ I " & , SUBSTR(delta.deltaIx,24,1) = "$" then do if DATATYPE(SUBSTR(delta.deltaIx,6,8)) <> "NUM" | , DATATYPE(SUBSTR(delta.deltaIx,26,8)) <> "NUM" then do say "**Error** Non-Numeric on Delta Record" deltaIx exit 12 end line1 = SUBSTR(delta.deltaIx,6,8) count = SUBSTR(delta.deltaIx,26,8) camservIx = camservIx + 1 camserv.camservIx = ") ADD" line1 do i = 1 to count deltaIx = deltaIx + 1 camservIx = camservIx + 1 camserv.camservIx = delta.deltaIx end end /* Delete */ when LEFT(delta.deltaIx,5) = "./ D " & , SUBSTR(delta.deltaIx,24,1) = "$" then do if DATATYPE(SUBSTR(delta.deltaIx,6,8)) <> "NUM" | , DATATYPE(SUBSTR(delta.deltaIx,15,8)) <> "NUM" then do say "**Error** Non-Numeric on Delta Record" deltaIx exit 12 end line1 = SUBSTR(delta.deltaIx,6,8) line2 = SUBSTR(delta.deltaIx,15,8) camservIx = camservIx + 1 camserv.camservIx = ") DEL" line1 || "," || line2 end /* Replace */ when LEFT(delta.deltaIx,5) = "./ R " & , SUBSTR(delta.deltaIx,24,1) = "$" then do if DATATYPE(SUBSTR(delta.deltaIx,6,8)) <> "NUM" | , DATATYPE(SUBSTR(delta.deltaIx,15,8)) <> "NUM" | , DATATYPE(SUBSTR(delta.deltaIx,26,8)) <> "NUM" then do say "**Error** Non-Numeric on Delta Record" deltaIx exit 12 end line1 = SUBSTR(delta.deltaIx,6,8) line2 = SUBSTR(delta.deltaIx,15,8) count = SUBSTR(delta.deltaIx,26,8) repcount = line2 - line1 + 1 camservIx = camservIx + 1 camserv.camservIx = ") REP" line1 || "," || line2 do i = 1 to repcount deltaIx = deltaIx + 1 camservIx = camservIx + 1 camserv.camservIx = delta.deltaIx count = count - 1 end if count > 0 then do camservIx = camservIx + 1 camserv.camservIx = ") ADD" line2 do i = 1 to count deltaIx = deltaIx + 1 camservIx = camservIx + 1 camserv.camservIx = delta.deltaIx end end end otherwise do say "**Error** Not sure what to do with Delta Record" deltaIx end end /* Select Control Card Type */ end /* deltaIx = 3 to delta.0 */ camservIx = camservIx + 1 camserv.camservIx = ") END" "EXECIO * DISKW CAMSERV (STEM camserv. FINIS" return