From: usenet on
Chris wrote:
> Hmmm, I see you are doing some cwd's and maybe positioning yourself

Ya know, that does ring a faint, distant bell (but it was a long time
ago). I think I tried to first process the fully-qualified
fileset/member name but that didn't work. So I cwd'ed to the fileset
and processed the member as a plain name, which worked. If I
understood TSO better I might know why... but, as you say, this isn't a
TSO group (and most folks here probably have no idea what TSO is, and
those folks are lucky!)

--
http://DavidFilmer.com

From: DJ Stunks on

Chris wrote:
> Hmmm, I see you are doing some cwd's and maybe positioning yourself
> better than I am before doing the get. My get requires the tick marks
> (') around the dataset name, but it's only because I'm getting it
> "fully qualified" for lack of any other term I know to use because I
> know precious little about TSO (and I'd like to keep it that way).

I have no idea what either of you are talking about, but remember that
if you want to pass 's in a string, using q// is probably a good way to
do so.

I'm sure both of you already know that, but I hadn't posted in a while
and I heard Paul was going to start keeping stats...

HTH!
-jp

From: Chris on
DJ Stunks wrote:
> Chris wrote:
> > Hmmm, I see you are doing some cwd's and maybe positioning yourself
> > better than I am before doing the get. My get requires the tick marks
> > (') around the dataset name, but it's only because I'm getting it
> > "fully qualified" for lack of any other term I know to use because I
> > know precious little about TSO (and I'd like to keep it that way).
>
> I have no idea what either of you are talking about,

Are you insinuting that we *do* know what we are talking about when
we're trying our best to indicate we don't (insofar as TSO is
concerned)...!??!!! ;-)

> but remember that
> if you want to pass 's in a string, using q// is probably a good way to
> do so.

Yeah, I'm grabbing the filename string from an XML file and the ' is in
the filename, essentially. If you check out my debug session (the one
trying to use Net::FTP) in the OP, you'll see that the 'FILENAME' is
being passed literally, as it should be. So no worries there.

This is a TSO nuance is my understanding. I think IBM TSO stands for:

(I)'ll (B)et (M)oney this will (T)ick (S)omeone (O)ff.

So that will get you up to speed on what IBM TSO means. And yep --
they were right.

> I'm sure both of you already know that, but I hadn't posted in a while
> and I heard Paul was going to start keeping stats...

Tally 'em up!

-ceo

From: l v on
Chris wrote:
> DJ Stunks wrote:
>
>>Chris wrote:
>>
> Yeah, I'm grabbing the filename string from an XML file and the ' is in
> the filename, essentially. If you check out my debug session (the one
> trying to use Net::FTP) in the OP, you'll see that the 'FILENAME' is
> being passed literally, as it should be. So no worries there.
>

The OP may want to verify the version of their Net::FTP is the highest
avaiable. I once had some issues with Net::FTP, upgrading it corrected
my problem.

Mainframe file names are quite simple IMO.

Here are the file name translations to unix (using
usenet(a)DavidFilmer.com's example program):

1) a . (dot) is a /
so DEPT.TFOO.BAR is DEPT/TFOO/BAR

2) if the file name is surrounded by single quotes, then that is the
full file name.
'DEPT.TFOO.BAR' is equlivant to /DEPT/TFOO/BAR

3) if the file name is *not* surrounded by single quotes, then the
login user name is prepended.
DEPT.TFOO.BAR is equlivant to 'MYUSER.DEPT.TFOO.BAR' which is
equlivant to /home/MYUSER/DEPT/TFOO/BAR

4) A mainframe file name can not begin with a digit. I think there are
some other restrictions.

Where it get confusing is that a file (dataset) on the mainframe can be
of two types, 1) a sequential dataset, or 2) a partitioned dataset.
You need to know which type you are dealing with.

A sequential dataset is a normal every day file that you would use OPEN
and CLOSE on. You use DEPT.TFOO.BAR to retrieve

A partition dataset (PDS) contains many files within it. Consider this
a directory. You retrieve the file using a file name like
'MYUSER.DEPT.TFOO.BAR(filename)' and need to do this for every file
within the PDS you want to ftp.

The following is an edited version of what I run, I hope I did not snip
too much.

use Net::FTP;

my $jclLib = 'sysx.p.jcllib';

### logon and ftp spool file to mainframe.
my $ftp = Net::FTP->new("$host", Debug => 0);
$ftp->login("$acf2Id", "$acf2Pw") || fail("Could not login - $@");
$ftp->site("lrecl=132 recfm=fb") || fail("Could not send site commands
- $@");
$ftp->put("$mvsFile.data", "'$mfFile'") || fail("Could not put
$mvsFile.data, '$mfFile' - $@");

# now get jcl
$ftp->get("'$jclLib(sp12)'", "$fileName.bjcl.in") || fail("Could not
get $jclLib(sp12 - $@");

# now put the edited jcl on the mainframe.
$ftp->site("lrecl=80 recfm=fb") || fail("Could not send site commands 2
- $@");
$ftp->put("$fileName.bjcl", "'tmp.foo.$mvsFile.bjcl'") || fail("Could
not put $fileName.bjcl - $@");

# now send the edited NDM jcl to the mainframe's JES queue to execute
the JCL.
$ftp->site("filetype=jes lrecl=80 recfm=fb") || fail("Could not send
site commands to send JCL to JES - $@");
$ftp->put("$fileName.jcl") || fail("Could not put $fileName.jcl - $@");

# now end the ftp session.
$ftp->quit || fail("Could not quit ftp session - $@");

Len

From: Rick Scott on
(Chris <newsbot(a)cox.net> uttered:)
> This is a TSO nuance is my understanding. I think IBM TSO stands for:
>
> (I)'ll (B)et (M)oney this will (T)ick (S)omeone (O)ff.
>
> So that will get you up to speed on what IBM TSO means. And yep --
> they were right.

OH! So you mean that the entertaining interactions I had with IBM's
software while writing an AIX package-handling script weren't a one-off
occurrence, then? I thought I was the only one! =)

=head1 BUGS

B<update.fixget> does not automatically recognize and repair
memos that are misformatted, mangled, confusing,
self-contradictory, or inutile. At least, not yet.




Rick
--
key CF8F8A75 / print C5C1 F87D 5056 D2C0 D5CE D58F 970F 04D1 CF8F 8A75
The SSH client is pretty good, it is free, and it is illegal in the US!
A winner all around!
:Steven Skovran