[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

NDM from unix sqr



Richard (et al),

We are HP UNIX and have been sending/recieving files to the mainframe using
NDM.  Attached is the sqc containing the procedure we use to send files directly
to the Mainframe out of sqr.  It does nothing more than format a command line
NDM command.

The big problem with NDM is the lack of a return code.  When putting a file up to
the mainframe or recieving a file down from the mainframe, it is important to be
sure you are working with the a current file.

We have few issues NDMing from UNIX to the Mainframe (NDMput).  Although it
is possible to schedule a job to run on the mainframe using NDM we do not this.
Instead we have jobs that are scheduled on the mainframe by the cataloging of
the file itself.

Again, there no easy way to determine if the NDMput was  successful.  You can
look at the ndm info but that is not a user friendly option.  It is important to set
your jobs up to verify they are using the correct file and do not use an old file if the
NDM was not successful.

The big issue we have NDMing from the Mainframe to UNIX  (NDMget) is the
variable amount of time it takes to recieve the file and again there is no status
code to tell you when the NDMget is done.  Which means we can't do an NDM
get in an sqr and then use that file.  There is also no way to kick off an sqr when
the file appears.

Currently, we have menu items in UNIX and manually NDMget the files.  Then we
wait a while and run the sqr that reads the file (how's that for scientific?).  The
important thing is to be sure that you have some way to determine if you really did
NDMget a file to be sure you aren't reading an old file.  You could delete the file,
or rename it when you are done.  We use some control totals and check those
also.

Other problems/issues:

Occasionally, the NDM on the mainframe goes down.  Since there are no return
codes, it can be quite a while before you realize it.  Bad.

User security.  We have support issues because our UNIX support is internal and
our mainframe support is supplied by our parent company. Trying to tie the UNIX
user to the mainframe user was a problem.

Feel free to contact me if you have any questions

jim

The Berry Company
(937) 296-4867



>>> Richard_Tomancik <Richard_Tomancik@TIGINSURANCE.COM> 11/23/98
10:39am >>>
We are laboring through the same issue now with an interface from
UNIX/Solaris/Oracle going to mainframes.

I am writing the interface output to an ASCII file with the number
formatted normally.  The UNIX guys are doing the conversion from ASCII to
EBCDIC using a software package from Sterling software called NDM and
moving the file from the UNIX box to the mainframe at the same time.  They
wrote some simple programs (COBOL I guess) to pack the decimals on the
mainframe side, which they will include in the mainframe job that already
runs.

We plan to run the SQR's on the server so the output can go straight to a
UNIX server and NDM can pick it up without us having to FTP the ASCII file
from the client to the server.  The only thing we haven't hacked yet is how
to control where the ASCII file placed on the UNIX box when SQR is run on
the server.  Any suggestions helpful on that one.

RT
817-975-1892




Daniel Guynes <Daniel_Guynes@PEOPLESOFT.COM> on 11/22/98 07:49:58
AM

Please respond to SQR-USERS@USA.NET

To:   Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
cc:    (bcc: Richard Tomancik/Consultant/Dallas/TIG)
Subject:  How do you write packed fields to file?




I am in a situation where a client needs an interface file ... but half of
the fields must be in packed format.  I have never come across this, much
less have any idea how to do it.  So, any help is greatly appreciated ...
thank you.

Danny

! ****************************************************************
! KDB 12/28/94 This sqc will take the parameters that are set    *
!               up in the calling program and execute the UNIX   *
!               script that will transfer the file to the main-  *
!               frame and optinally execute the specified jcl.   *
!               If there is not a mainframe job to run, set      *
!                $MF_JobName = spaces, otherwise set             *
!               $MF_JobName to the mainframe job name.           *
!               Required parameters:                             *
!               NAME                    EXAMPLE                  *
!               --------------          ---------------------    *
!               $UNIX_FileName          bglu301.dat              *
!               $MF_FileName            DHR.HR.ALLCO.AWE.DISK    *
!                       * (T) or (P) is set by setenv.sqc        *
!               $Rec_Length             100                      *
!               $Block_Size             6100                     *
!                       * (T) or (P) is set by setenv.sqc        *
!       KDB: 07/13/95 Do not append Job Name in the command to   *
!                       call the script.                         *
!       JEH: 08/01/95 Always use ndmca7.  Left the code in to    *
!                       determine which to use.  just uses the   *
!                       same one either way.                     *
!       KDB: 02/26/96 Modified so that the file could be sent to *
!                     either the LMB machine or the BIS machine. *
!                     To send a file to the BIS machine, the     *
!                     mainframe file cannot be a GDG.  Also,     *
!                     set $MF_JobName = 'BISA'                   *
!       KDB: 04/08/96 File Transfers to BISA should use ndmca7,  *
!                     not ndmput.                                *
! ****************************************************************

BEGIN-PROCEDURE SHIP-UNIX-FILE-TO-MAINFRAME

  ! verify that all mandatory parameters exist.
  Let $UNIX_FileName     = Rtrim($UNIX_FileName,' ')
  Let $MF_FileName       = Rtrim($MF_FileName,' ')
  Let $Rec_Length        = Rtrim($Rec_Length,' ')
  Let $Block_Size        = Rtrim($Block_Size,' ')
  Let $MF_JobName        = Rtrim($MF_JobName,' ')
  Let $Quote1            = ' '''
  Let $Quote2            = ''' '

  If  $UNIX_FileName     = ''
    OR $MF_FileName      = ''
    OR $Rec_Length       = ''
    OR $Block_Size       = ''
       Let #Status       = 1       !error.
       Display 'File Transfer unsuccessful'
       GoTo Exit
  End-If

  Let $FILEPREFIX        = '{FILEPREFIX}'
  Let $MF_PREFIX         = '{MF_PREFIX}'

  If  $MF_JobName        = 'BISA'                         !going to BIS?
    Let $GDG_Ind         = '" '
  Else
    Let $MF_FileName     = $MF_PREFIX||$MF_FileName       !(t)dhr / (p)dhr
    Let $GDG_Ind         = '(+1)"'||' '                   !goes to LMB.
    Let $MF_JobName      = ' '
  End-If

  If  $MF_PREFIX       = 'P'  OR                          !Prod. LMB.
      $MF_JobName      = 'BISA'                           !Prod. BIS.
      Let $Script_Name = 'ndmca7'
  Else
      Let $Script_Name = 'ndmput'                         !Test LMB.
  End-If

  Let #Status            = 0
  Let $MF_FileName       = UPPER($MF_FileName)

  Let $unix_command      =
      $Script_Name||
      ' '||
      $Quote1||
      $FilePrefix||
      $UNIX_FileName||
      $Quote2||
      ' "'||
      $MF_FileName||
      $GDG_Ind||
      $Rec_Length||
      ' '||
      $Block_Size||
      ' '||
      $MF_JobName

  Display 'UNIX Command issued:'
  Display $unix_command

  Call system using $unix_command #status

  If #Status            != 0
    Display 'File Transfer unsuccessful'
  End-If

 Exit:
END-PROCEDURE SHIP-UNIX-FILE-TO-MAINFRAME