ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » MQSC Code Formatting - MSOS question

Post new topic  Reply to topic Goto page 1, 2  Next
 MQSC Code Formatting - MSOS question « View previous topic :: View next topic » 
Author Message
mqjeff
PostPosted: Tue Oct 06, 2015 5:28 am    Post subject: MQSC Code Formatting - MSOS question Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I think I am in a good place to add code formatting to MS0S.

That is, to take a long string of MQSC
Code:
ALTER QLOCAL ACCTQ(...) BOQNAME(...) QDEPTHHI(...) SHARE QSVCIEF(...) DEFPRTY(...) ...


And format it using "+" or "-" into shorter lines.

My first thought is to make the use of "+" or "-" as a preference, as well as the line width.

I could also, somehow, figure out how to perform a "one parameter per line", like
Code:
ALTER QLOCAL +
     ACCTQ(...) +
     BOQNAME(...) +
     QDEPTHHI(...) + ...

That will be a little trickier, but I can probably work it out.

Do you have opinions on these decisions?

Other suggestions/ideas/thoughs/requirements ?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 06, 2015 5:47 am    Post subject: Re: MQSC Code Formatting - MSOS question Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Do you have opinions on these decisions?


I would say one parameter per line is more what my target audience would prefer.

mqjeff wrote:
That will be a little trickier, but I can probably work it out.


I have complete faith.

I will shed not one tear if it simply ends up as shorter lines, and will slap the first audience member that complains. Even if they're not complaining about this.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 5:53 am    Post subject: Re: MQSC Code Formatting - MSOS question Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
mqjeff wrote:
Do you have opinions on these decisions?


I would say one parameter per line is more what my target audience would prefer.


Great. Would that be okay as a preference, rather than an option picked at formatting time? That is, hold true for the entire workspace, rather than on a per file per formatting step basis?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 06, 2015 5:54 am    Post subject: Re: MQSC Code Formatting - MSOS question Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Vitor wrote:
mqjeff wrote:
Do you have opinions on these decisions?


I would say one parameter per line is more what my target audience would prefer.


Great. Would that be okay as a preference, rather than an option picked at formatting time? That is, hold true for the entire workspace, rather than on a per file per formatting step basis?




_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 6:02 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Excellent.

Everyone else - please speak up, even if you want to complain.

Vitor's slaps will just be words, and remember that words will never hurt you...

The more opinions or feedback I get, even if it's just "I agree with that guy", the more comfortable I'll feel about my decisions, and the better MS0S will work for you.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 6:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Oh, I guess a preference for the indent width/character (tab/n spaces).
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Oct 06, 2015 7:22 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9398
Location: US: west coast, almost. Otherwise, enroute.

... and retain compatibility with MQ for z/OS 80-character record limitation thingie?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 7:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

bruce2359 wrote:
... and retain compatibility with MQ for z/OS 80-character record limitation thingie?


Well, 80 characters would certainly be a valid format line-width.

And unless you turned on auto-formatting, then it would leave the documents alone. (I don't think the base MQExplorer will let you turn on auto-formatting, unless it's on by default).

Off the top of my head, I forget if the plain text zOS command queue allows you to use + and -. But zOS does support a PCF command queue these days. Another preference to use that instead of the plain text command queue...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 06, 2015 8:20 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Off the top of my head, I forget if the plain text zOS command queue allows you to use + and -


It does.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 8:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
mqjeff wrote:
Off the top of my head, I forget if the plain text zOS command queue allows you to use + and -


It does.


Then setting the line length to 80 (including the + or minus) would work just fine.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 06, 2015 8:34 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Vitor wrote:
mqjeff wrote:
Off the top of my head, I forget if the plain text zOS command queue allows you to use + and -


It does.


Then setting the line length to 80 (including the + or minus) would work just fine.


You could pander to the among us, and ensure the +/- is in column 73.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 8:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
mqjeff wrote:
Vitor wrote:
mqjeff wrote:
Off the top of my head, I forget if the plain text zOS command queue allows you to use + and -


It does.


Then setting the line length to 80 (including the + or minus) would work just fine.


You could pander to the among us, and ensure the +/- is in column 73.....


you could set the line width to 74...
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Oct 06, 2015 12:20 pm    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

mqjeff wrote:
...you could set the line width to 74...

Close to his age too
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Oct 06, 2015 9:57 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

mqjeff wrote:


Vitor's slaps will just be words, and remember that words will never hurt you...

.


Are you sure about that
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fjb_saper
PostPosted: Tue Oct 06, 2015 10:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

An output similar to the one from dmpmqcfg would be nice.
What I am thinking about here is being able to run a diff against a file produced by dmpmqcfg....
Doesn't matter if the commented out headers are a different...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General Discussion » MQSC Code Formatting - MSOS question
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.