What I've got is baed on a code snippet that I was given by someone working on the mainframe. I translated it to use in Perl. There are a few things I'm not quite sure about namely PRI and SEC (I think this has to do with disk allocation on the mainframe).
$ftp->site("PRI=<some number>","SEC=<some number>",
"RECfm=<record format - either Fixed Block or Variable Bloc
"LRecl=<record length number>",
"BLocksize=<block size number>",
"Unit=<not sure about this one>") or die "Cannot set SITE c
$ftp->site("trail") or die "Cannot issue SITE 'trail' command. $!";
$ftp->put("<file-name>","\'Data.Set.Name(+1)\'") or die "Cannot put <f
+ile-name> to Data.Set.Name. $!";
Note, the (+1) after the dataset name indicates that the data set is a plus one generation (the generation number is incremented by one each time a file is sent. Block size, record Length, Record Format and whether it is a generational dataset is determined by the mainframe and they would have to tell you (assuming it matters). Also, I have found that the transfer works when surrounded by the single quotes - even if I were doing this on the command-line FTP client.
This may not all be necessary for the mainframe Z/OS, but might get you going in the right direction. Good luck.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||