Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
True, true. But learning how to prove things programmatically might come in handy during later more complex projects, perhaps? The other profile overrides got output from a QUEUE'd EMSG without issue. Only CSLMAP so far is not working. I found what seems to be the problem, there seems to be a bug in CSLMAP EXEC's code: CSLMAP EXEC appears to ONLY be calling the DEFAULTS / GLOBALV profile when CSLMAP 's APPEND option is specified & no PROFILE option is specified on the same CSLMAP call. Consulted my more senior teammates, then opened IBM SR 55882 004 000 about it : https://www-947.ibm.com/support/servicerequest/problemDescriptionSelect.action?srNumber=55882=004=000 . --Shawn S. -Original Message- From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On Behalf Of Glenn Knickerbocker Sent: Monday, July 11, 2016 1:26 PM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids' On 7/10/2016 12:12 PM, Stanislawski, Shawn (National VM Capability) wrote: > I couldn't get EMSG to show up when using CSLMAP command from CMS, > however, which was very strange. Was unable to quick verify for that > one. There's always SAY, or PIPE rexxvars | > etc. But you can also look right at the XEDIT commands in the SEXECs. The filename is always USERID(), so just search for XEDIT and USERID together. ¬R
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
On 7/10/2016 12:12 PM, Stanislawski, Shawn (National VM Capability) wrote: > I couldn't get EMSG to show up when using CSLMAP command from CMS, > however, which was very strange. Was unable to quick verify for that > one. There's always SAY, or PIPE rexxvars | > etc. But you can also look right at the XEDIT commands in the SEXECs. The filename is always USERID(), so just search for XEDIT and USERID together. ¬R
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
On Friday, 07/08/2016 at 06:53 GMT, "Stanislawski, Shawn (National VM Capability)"wrote: > I admit to being curious, how does CSL update the variables CSLRC and CALLER (in Alan's example) in > the calling program? There are two elements working together: 1. The REXX Shared Variable (SHV) interface allows programs called by REXX to get and set REXX variables by name. 2. Every CSL routine has a "template" that defines the parameter types (ubin, sbin, char.) and their usage (input, output, inout, required, optional). The CSL built-in function looks at those templates and uses the SHV interface convert the data REXX variable content to to the proper form, invoke the specified CSL routine, and then store the responses back into the indicated REXX variables (again using the SHV interface). Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
On 7/8/2016 10:50 AM, Stanislawski, Shawn (National VM Capability) wrote: > PEEK EXEC sets BOTH variable PEEK and NOTE , so I can't have both > PEEK / PROFPEEK and NOTE / PROFNOTE in the same converged file > using this single method. You don't need to dig around in the caller at all. Each one uses its own name as the filetype. (The names are hardcoded, so you don't have to worry about RENAMEd or EXECLOADed copies, which I assume is why you weren't just looking at the name of the caller in the first place.) Most (but not DIRLIST) also put it in the argument after the options, and the oldest ones (NOTE, PEEK, FILELIST, RDRLIST) repeat it as the first word of the tokenized command. You can get it from your argument: Parse Arg fn ft fm '(' opts ')' exec tokenexec tokenopts and you could double- or triple-check FT against EXEC and TOKENEXEC as appropriate if you were super-picky. Or, if you want to accommodate being called without arguments by another profile, you could just get it from EXTRACT /FILETYPE/ . ¬R
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
On Friday, 07/08/2016 at 04:28 GMT, "Stanislawski, Shawn (National VM Capability)"wrote: > Looking into Bruce Hayden's suggestion of DMSCALLR CSL routine was spot on! > New and much better solution: > "d > /* Who called me? */ > Farback = 4 > CALL CSL 'DMSCALLR' Retcode1 CallerN Farback > 'PIPE VAR CallerN | SPECS W2 1 | VAR CallerN' > " > When command FILEL then CallerN = FILELIST Almost. :-) DMSCALLR sat on my A-disk long before I got my colleagues to integrate it into CMS years ago, and I suggest using a loop to insulate your program against variations that show up in the calling sequence. /* Find name of inner-most recognizable EXEC */ do i = 2 by 1 until cslrc <> 0 Call CSL "DMSCALLR cslrc caller i" parse var caller what +8 which . if what = "EXEC" & right(which,4) = "LIST" then leave which = "*UNKNOWN*" end say "CALLED BY" which This programming idiom not only avoids issues with compiled v. interpreted EXECs and changes in the structure of the calling program, it also helps you writes EXECs that can operate differently in XEDIT vs. from the command line, but without false positives. For example, if you go into XEDIT, then into CMS subset mode, you do not want the output of an issued command to go to XEDIT. You want to see it in CMS. But when you return to XEDIT and issue the command again, you would like to see the output as an XEDIT EMSG/MSG. And of course, if you issue the command in a PIPE, you definitely want the output to go to the console. Alan Altmark Senior Managing z/VM and Linux Consultant Lab Services System z Delivery Practice IBM Systems & Technology Group ibm.com/systems/services/labservices office: 607.429.3323 mobile; 607.321.7556 alan_altm...@us.ibm.com IBM Endicott
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
- Yeah, I named my converged profile "PROFPRGS XEDIT", and "PARSE SOURCE srcline" followed by "QUEUE 'EMSG 'srcline" then calling FILELIST only gives: "CMS COMMAND PROFPRGS XEDIT * PROFPRGS XEDIT" - I only get the same string even if I set up a user synonym for FILELIST and use that synonym. - The CMS Command reference didn't say I could set a synonym for an XEDIT file, and indeed I received error "DMSXIN002E File PROFPK01 XEDIT * not found" with RC=28. (where "USER SYNONYM" had "PROFPK01 PROFPRGS", and I did "DEFAULTS SET PEEK PROFILE PROFPK01".) Looking into Bruce Hayden's suggestion of DMSCALLR CSL routine was spot on! New and much better solution: " /* Who called me? */ Farback = 4 CALL CSL 'DMSCALLR' Retcode1 CallerN Farback 'PIPE VAR CallerN | SPECS W2 1 | VAR CallerN' " When command FILEL then CallerN = FILELIST --Shawn S. -Original Message- From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On Behalf Of Bruce Hayden Sent: Friday, July 08, 2016 10:30 AM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids' You probably want to look at the DMSCALLR CSL routine. You can work your way back though the commands to find out how you were called. (I haven't looked to see what you find when it is called from one of these profiles.) -Original Message- From: Stanislawski, Shawn (National VM Capability) Sent: Friday, July 08, 2016 10:14 AM To: CMS-PIPELINES@VM.MARIST.EDU Subject: RE: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids' > Can you use synonyms and PARSE SOURCE? PARSE SOURCE in the XEDIT profile just gives the name of the XEDIT profile and not the calling EXEC, unless I'm doing it wrong. Can XEDIT filetypes be used with Synonym? --Shawn S. -Original Message- From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On Behalf Of Paul Gilmartin Sent: Friday, July 08, 2016 9:57 AM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids' On 2016-07-08, at 08:50, Stanislawski, Shawn (National VM Capability) wrote: > > I would like to make these overrides more portable: one XEDIT file instead of > multiples. > Can you use synonyms and PARSE SOURCE? -- gil
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
> Can you use synonyms and PARSE SOURCE? PARSE SOURCE in the XEDIT profile just gives the name of the XEDIT profile and not the calling EXEC, unless I'm doing it wrong. Can XEDIT filetypes be used with Synonym? --Shawn S. -Original Message- From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On Behalf Of Paul Gilmartin Sent: Friday, July 08, 2016 9:57 AM To: CMS-PIPELINES@VM.MARIST.EDU Subject: Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids' On 2016-07-08, at 08:50, Stanislawski, Shawn (National VM Capability) wrote: > > I would like to make these overrides more portable: one XEDIT file instead of > multiples. > Can you use synonyms and PARSE SOURCE? -- gil
Re: [CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
On 2016-07-08, at 08:50, Stanislawski, Shawn (National VM Capability) wrote: > > I would like to make these overrides more portable: one XEDIT file instead of > multiples. > Can you use synonyms and PARSE SOURCE? -- gil
[CMS-PIPELINES] Converged custom profiles for 'CMS Productivity Aids'
The CMS Commands and Utilities Reference Appendix "Customizing Profiles for CMS Productivity Aids" lists 10 profiles (plus 4 just for FILELIST) that can be seen with the CMS command DEFAULTS and can be overridden with "DEFAULTS SET PROFILE newprof" (where "" is an EXEC Fn from the list such as DIRLIST or RDRLIST, for FILELIST "PROFILE" might instead be "PROFILEn" where n=[2|3|4], and "newprof" is an XEDIT file). (For reference, the EXEC Fn list is: Alialist , Authlist , Csllist , Cslmap , Dirlist , Filelist , Maclist , Note , Peek , Rdrlist , Vmlink .) I would like to make these overrides more portable: one XEDIT file instead of multiples. Of course doing so means the converged file will need to be able to determine who he's supposed to be each time when called (unless I only use changes that blanket ALL included profiles, which I would rather not do). I have found a partial solution to do so, but I am not happy with it. The "solution" is: 'PIPE REXXVARS 1', '| DROP 1', '| NFIND v', '| SPECS w2 1', '| ALL /FILELIST/ ! /DIRLIST/ ! /RDRLIST/ ! /PEEK/', '| VAR TARPROF' (So, currently only checking the calling program for the existence of variables: "FILELIST", "DIRLIST", "RDRLIST", and "PEEK". Then setting value of "TARPROF" to the name of the variable found, before doing a SELECT structure with "TARPROF".) Because the EXEC from the list checks for its DEFAULTS profile setting via: 'GLOBALV SELECT $'"USERID"() 'GET ' , where "" = EXEC Fn from the list and sets a variable with the same EXEC Fn. The problem is: PEEK EXEC sets BOTH variable PEEK and NOTE , so I can't have both PEEK / PROFPEEK and NOTE / PROFNOTE in the same converged file using this single method. (Otherwise the "solution" works for the 4 profiles I'm currently working with.) Eventually, I may even wish to combine this file with my PROFILE XEDIT as well, if possible. Any ideas? Shawn Stanislawski HPE - VM Capability