John,

One of the most bizarre things I could ask of an MVS transplant
is to look over autoconf, but it does more or less all of the
things you want to do. It requires a skill known as writing
m4 macros, which isn't _completely_ bizarre, but it will probably
look like Greek to you on your first pass.

autoconf was designed to output all those "configure" scripts you
must have seen all over the place ... it builds them from a "template"
(what you're referring to as a 'skeleton'). You can literally build
anything from autoconf templates.

Regards,
--Jim--
James S. Tison
Senior Software Engineer
TPF Laboratory / Architecture
IBM Corporation
"A bird in hand is safer than one overhead."



                      "McKown, John"
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]
                      tr.com>                  cc:
                      Sent by: Linux on        Subject:  Something akin to ISPF's 
skeletons?
                      390 Port
                      <[EMAIL PROTECTED]
                      IST.EDU>


                      07/31/2003 15:26
                      Please respond to
                      Linux on 390 Port






This is definately for the MVS transplants. I'm looking at doing something
akin to what ISPF does with its skeleton facility. That is, I have a file
which contains JCL. Instead of hard-coding some things, there would be
"variables" which would be replaced by the appropriate content when a
script
is executed. For instance, suppose I have a script similar to:

#!/bin/sh
mfid=$(id -an | tr 'a-z' 'A-Z')
acct='(A,B)'
jobclass='A'
msgclass='C'
pgmrid='John McKown'
.. do skeleton processing here
.. more processing

The "skeleton" would contain something like:

//{mfid}A JOB ${acct},\'${pgmrid}\',
// MSGCLASS=${msgclass},
// CLASS=${jobclass}

After processing, some output file would contain:

//JMCKOWNA JOB (A,B),'John McKown',
// MSGCLASS=C,
// CLASS=A

What I was thinking, but obviously doesn't work is:

cat <<EOF >output.file
.skeleton
EOF

If I make the "cat" command as the first statement in the skeleton and the
EOF the last statement, this works as I want. For some reason, I find this
inelegant.

Where "skeleton" contains the above. But I can't thing of a way to "source"
a file within a HERE document. So far, I'm only using BASH. But this may be
a case where I'm force to something more powerful such as Perl.

--
John McKown
Senior Systems Programmer
UICI Insurance Center
Applications & Solutions Team
+1.817.255.3225

This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and its' content is
protected by law.  If you are not the intended recipient, you should delete
this message and are hereby notified that any disclosure, copying, or
distribution of this transmission, or taking any action based on it, is
strictly prohibited.

Reply via email to