How to edit MVS files via FTP?

How to edit MVS files via FTP?

6
NewbieNewbie
6

    Oct 12, 2007#1

    Many times I have to edit MVS files in UE that has no carriage return after FTP and convert to ASCII into UE. In order to keep the same format as in MVS, I have to go to advance/configuration/editor display/miscellaneous and set the 'max column before wrapping' to either 80 or 132. Is there any easier way to change this parameter without going through all these menus ?

    Also, do anyone has experience editing MVS text file in UE ? Is there any way to set the carriage return so UE can understand when converting from EBCDIC to ASCII ?

    Thanks in advance.

    David

    6,675585
    Grand MasterGrand Master
    6,675585

      Oct 13, 2007#2

      Do the MVS files have carriage returns on the host system?

      If yes, why they are removed during transfer via FTP? If you select the binary FTP mode, the carriage returns are not removed and UltraEdit will recognize the file as MAC file and interpret the carriage returns as line terminations.

      Do you know that the wrapping and tab settings can be specified individually for files based on their file extension? So you can save or rename the MVS files which need a wrap at column 80 for example with "ext1" and the others with "ext2" and so you don't have to always modify the wrap setting. See topic extension based tab settings problem where I have explained how to setup individual word wrap/tab settings based on the extension of the file.

      Faster access to word wrap setting could be done by assigning a hotkey for AdvancedConfiguration. Then you can press this hotkey, followed by Alt+N, followed by the keys w and o and last key Return or Enter. Reads difficult, but is fast when learned the keys.

      I have never seen a MVS file.
      Best regards from an UC/UE/UES for Windows user from Austria

      10211
      Power UserPower User
      10211

        Oct 15, 2007#3

        I regularly edit MVS source files (mainly assembler) in Ultraedit, using the Ultraedit FTP client to transfer them. In your FTP account settings, do you have the server type defined as MVS. If this is set correctly then the files should be transferred correctly. Mofi, for your benefit, records on MVS have no carriage return to mark their end. On MVS records are stored as fixed length (usually for code source), variable length, or undefined length (for executables). Providing the FTP server type is correctly set you should be able to transfer fixed and variable length files to Ultraedit. A carriage return is automatically inserted to amrk the record length on the conversion from EBCDIC to ASCII, and removed when the record is saved again back to EBCDIC on MVS. You can use the View/Show Line Endings menu option to display where the carriage returns are placed when the records are downloaded.

        Cheers...

        Frank

        6
        NewbieNewbie
        6

          Oct 19, 2007#4

          Hello fgeurts and Mofi,

          Thanks for your help and info. I checked my setting and it is in MVS. However, it is still not displaying right. Are there any other parameters I need to set ? My advance setting are:
          Default Transfer Type: Binary
          Sever Type : MVS
          List Command Filter : < blank>
          Full path leading character: .
          Path/Note seperator: .
          Name Index: -1
          Size Index: -1
          Use MDTM and Size: <checked> < I tried unchk but result the same >
          Passive Transfer: <blank>

          Thanks

          262
          MasterMaster
          262

            Oct 19, 2007#5

            You download with "Default Transfer Type: Binary". This mean, that codepage conversion cannot be performed directly in the FTP download. This way the FTP can't insert CR's into the text file corresponding with the LRECL length in the MVS file.

            If I understand this correct:
            oht3075 wrote:Also, do anyone has experience editing MVS text file in UE ? Is there any way to set the carriage return so UE can understand when converting from EBCDIS to ASCII ?
            you later covert from EBCDIC to ASCII yourself using UE File - Conversions - EBCDIC to ASCII - right ?

            If this is the case, and you prefer doing it this way, you will need to use File - Special functions - Insert string at every increment and insert the string ^p at increments corresponding with the LRECL on the MVS. (Variable length MVS records cannot be handled this way). When you have to upload again ^p has to be removed again and converted back into EBCDIC. But this is tricky if lines are no longer fixed length.

            I will recommend using "Default Transfer Type: Ascii" and letting the FTP download perform the to and from EBCDIC to ASCII conversion.

            6
            NewbieNewbie
            6

              Oct 22, 2007#6

              jorrasdk wrote:I will recommend using "Default Transfer Type: Ascii" and letting the FTP download perform the to and from EBCDIC to ASCII conversion.
              THANKS - This works GREAT !!

              By the way, after you edited the MVS file, can you issue the 'SUB' command in UE to submit the job to MVS or you have to signon to MVS before you can sumbit the job ?

              Greatly appreciate if you can shine some ligth on this issue.

              262
              MasterMaster
              262

                Oct 23, 2007#7

                Well my initial response to the remote "SUB" from inside UE is: No.

                The reason being that UE's FTP component isn't advanced enough to do this. We miss an option for specifying an initialize command when connecting to the FTP server.

                If you select some another FTP client software you might be able to specify the initialize command: "SITE FILETYPE=JES" on your host connection. Then when you put a file to the host, the file is put directly to the JES. An if it is valid JCL it should run straight away. I have done this succesfully with WS_FTP a couple of years ago. (It's been almost 2 years since I stopped working with mainframes).

                You could however try and make a bat file that invoke windows command line FTP client, sign on, quote SITE FILETYPE=JES, put your filename. Then set it up as a user tool in UE. But I will not recommend this approach as it may compromise the password for your FTP account.

                Read more about submitting JCL to a remote JES using FTP...

                Also you could check if FTP2JES v.1.1 can be used in your situation. I haven't used it for many years, so I do not know if it is still valid in a WinXP context.

                6
                NewbieNewbie
                6

                  Oct 23, 2007#8

                  It would be 'COOL' for UE if the user can attached a command or two along with the ftp to save the code. This would benefit both MVS and Unix users. Do you think technically it will take UE that much effort to add this feature since they already have the ftp connection set up ?

                  Right now it's kind of stupid to have the cool ftp feature of the code on one hand and then manually going back and forthe to exec the code.

                  Thanks for your infomation and the links.

                  262
                  MasterMaster
                  262

                    Oct 23, 2007#9

                    I think you should write a feature request to IDM. Send it to the e-mail address at the top of the page. Explain which feature is missing. Include a link to this thread. Thanks.

                    Maybe it will then find its way into a future release of UE.

                    6
                    NewbieNewbie
                    6

                      Oct 25, 2007#10

                      Hello jorrasdk,

                      I turned in a request and IDM's answer is
                      'Thanks for your message and for the feature suggestion. I spoke with the developers regarding your suggestion. There are no current plans to implement such a feature. However, they said they may implement some "SITE" commands in a future release.'

                      Do you know this 'SITE' commands is the same as the FTP initialised command in your provious comment ? If so, in what way, better or worst ?

                      Thanks

                      262
                      MasterMaster
                      262

                        Oct 25, 2007#11

                        Yes I think SITE will be sufficient for initialize commands.

                        But we need to be able to specify these SITE commands ourselves per FTP account. And we need to be able to specify more than one and even SITE commands for GET and for PUT.

                        For GET we might want to specify (example):
                        SITE SBD=(IBM=277,ISO8859-1);SITE TRAIL
                        for letting the MVS FTP server control the codepage translation and preserve trailing blanks.

                        For PUT (example, not related to GET example) we might want to send DCB info to override defaults on the MVS for creating datasets:
                        SITE LRECL=132;RECFM=VB

                        So we just have to wait and see what IDM comes up with.