IBM Mainframe copy/paste - mainframe

Disclaimer: I'm new to using Rumba to access IBM Mainframe.
I have currently set up a library for personal use and I have some code that I want to store in a member of this library, how can I copy/paste from a .txt file on my desktop into this program??? As of right now I can successfully copy/paste one line at a time from documents outside of Rumba.

There are various ways. The best one will depend upon the size of the file/amount of data to be transferred.
If it's only a few lines, block copy and paste should work, but you might have to play with Rumba's 'paste' edit settings such as how to handle new lines, etc.
Bigger files can be transferred with the TSO file transfer program indĀ£file (maybe ind$file on your system) which essentially copies a file to the screen and then Rumba 'scrapes' the screen for data to put into a file (this is for a mainframe-to-PC transfer; for going the other way the operation is reversed). This can be surprisingly quick.
Lastly there's FTP - either from the command line or via a program such as WinSCP.
Edit:
Based on your comment that the files are about 300 lines long, I'd look into using Rumba's file-transfer option using the ind$file utility. Once you have the files on one system, speak to your mainframe tech support team about the best way to get them to the other systems.
If you need help uploading the files, then the tech support team should be your first point of call.

What mainframe editor are you running? TSO/ISPF?
I copy and and paste from ".txt" files into ISPS all the time with no problem.
Select the text you want to copy (in the ".txt" file)
Press CTRL-C
Open the mainframe file using ISPF Edit (option 2).
Enter line command "Inn" at the line where where you want the copy to start.
(This inserts "nn" empty lines to receive the copied data. Personally, I usually use "nn"=20)
Position your cursor at the first character of the first empty line.
Press CTRL-V

Related

Undo changes in Paint/image editor

Assuming that paint lets its users undo changes, I wonder whether it's possible to redo those changes by any computer means after the initial file has been saved.
Steps to reproduce:
1. Open a .jpg file in paint
2. Draw a line
3. Save as New.jpg
4. Open New.jpg in paint
5. Delete that line
Is the 5th step actually doable using any software/by coding whatever?
This is a question for SuperUser more than StackOverflow.
However, the answer is that it's only possible if the software stores the history of change steps to the saved file. Most common interchangeable image formats, like the JPG example in your question, do not support storage of that information.
An image editor could save to a format, likely to be specific to the editor, which preserves the history of alterations to the image. However, this could lead to a lot of storage of data that is usually not useful in the future, so there isn't a huge amount of demand for the feature.
Note that what is sought in the question could be done by a new operation to erase the line or parts of it, but not as an undo operation from the prior editing session.

Open folder based on string?

I'd like to write a bat file that can open a folder based on a string.
For instance if the job code is A100
I'd like it to open X:\A Contracts\A100
for B200
X:\B Contracts\B200
etc.
i.e. A etc. is the contract and needs to be one string to allow the "A Contracts" part of the path to be targetted and then the job code needs to be the end.
I have codes from A-D but the last part of the code is always the end folder. However, it is usually A100 - job name (which aren't easy enough to remember). Is it possible to target a partial match using this?
I'm used to writing in Matlab and other scripting languages but I'm a bit fresh with BAT files so any help is much appreciated.
Also, if it'd be possible for the script to keep CMD open and loop back to re-input the next code that'd be amazing!
This is a simple batch file witch will take user input and appropriately open windows explorer with your specifications.
#echo off
set /p code="Job Code: "
set dir="X:\%code:~0,1% Contracts\%code%\"
:: Open Explorer using %dir%
explorer %dir%
And that will do what you want. It shouldn't be too difficult to modify.
Mona

Matlab: open files 'outside Matlab' by default

I'm looking for a way to have Excel files in my Matlab folder open 'outside Matlab' (i.e., by MS Excel in most cases) directly by double-clicking the file, rather than right-clicking and selecting 'Open Outside Matlab'.
The .xls files reader built in Matlab can be terribly slow for large files, and an unwanted double-click on a file can cost quite some time in which Matlab is unresponsive.
Thanks.
When you click something in the Current Folder tab, it's actually running the open command, which itself calls finfo to determine what it means by "open" for a given extension. You can see this by creating a breakpoint in open.m directly after the line [~, openAction] = finfo(fullpath); and double clicking - when it hits the breakpoint you'll see it returns openAction as uiimport.
In theory, you can create custom methods for extensions by creating on the path a function openabc where abc is the extension, which should be returned as the openAction.
However, if I look at my finfo.m it first searches for said functions and then regardless of whether or not it finds them if there is an inbuilt method it overwrites them with the standard behaviour. There's even a comment:
% this setup will not allow users to override the default EXTread behavior
If you are willing to muck about in the inbuilts, you may be able to do it like this (backup first! - this could affect other things). I did it temporarily by shadowing the existing finfo like this:
edit finfo.m (Now save a copy to the current folder)
Add these lines after the loop that defines the openAction (in my version, around line 85):
if any(strcmp(['.' ext], matlab.io.internal.xlsreadSupportedExtensions))
openAction = 'winopen';
end
From the folder containing your edited finfo.m, type which finfo -all. You should see two copies, the MATLAB one labelled as shadowed. Opening something from the current folder window should now open Excel externally.
I don't believe there's any straightforward way to do that. It's built in to MATLAB that Excel files will open in the import tool when you double click on them, and there's no way to change that.
You might be able to get around it by changing the file extension on your Excel files to something other than .xls or .xlsx. That would stop MATLAB from opening it in the import tool. Then in Windows, you could associate the new file extension with Excel.

Append text file with custom footer

Good day,
I am a CNC program not a computer programer. I am using CAM software to make cutting programs for our CNC router. The router is a bit old and can only take files 200-300 kb big. We are doing carvings that require 1-2 megs text files. I am using a program called GSplit ( http://www.gdgsoft.com/gsplit/ ) to divvy up the text file. It generates 10-25+ files with a custom header that our machine can read. All the files are great and it works, but I have to manually add the closing lines/footer to each file. The files that are created and used are normal .txt files but with a specific extension, .ANC.
Is there any way to automate this process of opening each individual file, scrolling to the end and copy/pasting the same 1-2 lines of code? The files are NAME[number].ANC in a contained folder. Would it be possible to just direct to a folder and say "add this 'text' to every file in this folder"?
Thanks for your time.
What OS are you using? Using Unix you can do a simple script on command line. If you are in the directory with the specific files simply execute:
for file in *; do echo "APPEND THIS" >> $file; done
If you are running Windows you should be able to do the same using cygwin (probably you could also use the power shell, but I don't know anything about the that)
I found a program Notepad++ (apparently the last person to find it...). USed the find/replace files option. A regular expression(note sure exactly what these are but I'm sure you guys do) "\s+\z" as to what to look for. It finds the last space or whatever at the end of all the files and then adds the code I need. Easy, free, and I don't need to write any computer code. Thanks for the attempt to help me Dirkk! :)

Zip file with .csv extention lost somewhere in filesystem

The file is also locked with winzip and I cant remember the name or directory, I hid it in a very obscure directory. Could be in the windows system files could be in a program directory file. I did a search for all .CSV files I have 4-5K to go through. Any suggestions on how this could be done?
I was opening up files in batches by highlighting a bunch that pressing edit with notepad plus plus. Than going through each one. I know once the file is opened in notepad plus it will not show any words. It is pictures. I own an eCommerce site and I have my master copies that I bought $X,XXX and did not want to take any chances in them be found and resold by other people on my network. Any suggestions?
Opening any zip file in a hex editor suggests that every zip file starts with a data of PK. We can use it in our favour. :)
Download this software: EditPad Pro
What this software does is, it recurses through the whole filesystem starting from a specified base folder to search for any string residing in any of the child files, they maybe Text or Binary, it treats them the same, thus giving accurate results.
In our case, it's a regex: ^PK
When you'll execute this search, the software will return all the files that start with data PK, make sure you do a casesensitive search.

Resources