Next: TELNETG and TAG++
Up: FORTRAN callable interface
Previous: General utility routines
CALL XZCD (PATH,IRC)
- PATH
- Character variable specifying the name of the remote directory
to be set.
- IRC
- Integer variable in which the return code is returned.
This routine changes the remote directory to that specified by
the character variable PATH. On VM systems, the remote directory
should be given in the form user.address or <user.address>
If the address is omitted, 191 is assumed.
Example of using the XZCD routine
CALL XZCD('FAT3.192',IRC)
IF(IRC.NE.0) PRINT *,'Error setting remote directory'
On remote VM systems, one can change directory to a mini-disk that
has a read or write password by specifying the password and access
mode required, as in the examples below.
*
* Read link to FAT3.192
*
CALL XZCD('FAT3.192 MYPASS R',IRC)
*
* Write link to FAT3.192
*
CALL XZCD('FAT3.192 MYPASS W',IRC)
CALL XZLCD (PATH,IRC)
- PATH
- Character variable specifying the name of the local directory
to be set.
- IRC
- Integer variable in which the return code is returned.
This routine changes the local directory to that specified by
the character variable PATH. On VM systems, the local directory
should be given in the form user.address or <user.address>
If the address is omitted, 191 is assumed.
Example of using the XZLCD routine
CALL XZLCD('FAT3.192',IRC)
IF(IRC.NE.0) PRINT *,'Error setting local directory'
CALL XZPWD (PATH,IRC)
- PATH
- Character variable in which the current remote directory
is returned.
- IRC
- Integer variable in which the return code is returned.
This routine returns the current remote directory.
Example of using the XZPWD routine
CALL XZPWD(PATH,IRC)
IF(IRC.NE.0) THEN
PRINT *,'Error setting remote directory'
ELSE
PRINT *,'Current working directory is ',PATH(1:LENOCC(PATH))
ENDIF
CALL XZLPWD (PATH,IRC)
- PATH
- Character variable in which the current local directory
is returned.
- IRC
- Integer variable in which the return code is returned.
This routine returns the current local directory.
Example of using the XZLPWD routine
CALL XZLPWD(PATH,IRC)
IF(IRC.NE.0) THEN
PRINT *,'Error obtaining local directory'
ELSE
PRINT *,'Current working directory is ',PATH(1:LENOCC(PATH))
ENDIF
CALL XZLS (PATH,FILES,MAXFIL,NFILES,ICONT,CHOPT,IRC)
- PATH
- Character variable specifying the path name for the remote
ls command. If the intention is to list the current working
directory, PATH should be set to a single blank.
- FILES
- Character array of size MAXFIL in which the remote file names
are returned. If more than MAXFIL files are found, IRC will be set
to -1. XZLS may be called again with ICONT.NE.0 to receive the
the next batch of file names.
N.B. no further communication with the remote node is possible
until all pending file names have been read. Use the PATCHY sequence
CZFLUSH to flush pending file names if required.
- MAXFIL
- Integer constant specifying the dimension of the character array
FILES.
- NFILES
- Integer variable in specifying
the number of files returned in FILES.
- ICONT
- Integer variable specifying
the number of files returned in FILES.
- CHOPT
- Character variable specifying the required options:
If CHOPT = 'L' a 'long listing' will be returned.
This corresponds to the Unix ls option -l and the VM LISTFILE option L.
- IRC
- Integer variable in which the return code is returned.
This routine issues a remote LS command and returns the output
in the character array FILES.
Example of using the XZLS routine
CALL XZLS('*.CARDS',FILES,100,NFILES,0,'L',IRC)
IF(IRC.NE.0) THEN
PRINT *,'Error issuing remote LS command'
ELSE
DO 10 I=1,NFILES
PRINT *,FILES(I)(1:LENOCC(FILES(I)))
10 CONTINUE
ENDIF
CALL XZLLS (PATH,FILES,MAXFIL,NFILES,ICONT,CHOPT,IRC)
- PATH
- Character variable specifying the path name for the local
ls command. If the intention is to list the current working
directory, PATH should be set to a single blank.
- FILES
- Character array of size MAXFIL in which the remote file names
are returned. If more than MAXFIL files are found, IRC will be set
to -1. XZLS may be called again with ICONT.NE.0 to receive the
- MAXFIL
- Integer constant specifying the dimension of the character array
FILES.
- NFILES
- Integer variable in specifying
the number of files returned in FILES.
- ICONT
- Integer variable specifying
the number of files returned in FILES.
- CHOPT
- Character variable specifying the required options:
If CHOPT = 'L' a 'long listing' will be returned.
This corresponds to the Unix ls option -l and the VM LISTFILE option L.
- IRC
- Integer variable in which the return code is returned.
This routine issues a remote LS command and returns the output
in the character array FILES.
Example of using the XZLLS routine
CALL XZLLS('*.CARDS',FILES,100,NFILES,0,'L',IRC)
IF(IRC.NE.0) THEN
PRINT *,'Error issuing LS command'
ELSE
DO 10 I=1,NFILES
PRINT *,FILES(I)(1:LENOCC(FILES(I)))
10 CONTINUE
ENDIF
CALL XZMV (SOURCE,TARGET,CHOPT,IRC)
- SOURCE
- Character variable specifying the source file name
- TARGET
- Character variable specifying the target file name
- CHOPT
- Options
- C
- Respect case of file names (Unix systems)
- IRC
- Integer variable in which the return code is returned.
This routine moves the remote file from SOURCE to TARGET.
CALL XZLMV (SOURCE,TARGET,CHOPT,IRC)
- SOURCE
- Character variable specifying the source file name
- TARGET
- Character variable specifying the target file name
- CHOPT
- Options
- C
- Respect case of file names (Unix systems)
- IRC
- Integer variable in which the return code is returned.
This routine moves the local file from SOURCE to TARGET.
CALL XZRM (FILE,IRC)
- FILE
- Character variable specifying the name of the file to be removed.
- IRC
- Integer variable in which the return code is returned.
This routine issues deletes the specified file on the remote system.
Example of using the XZRM routine
CALL XZRM('CSPACK.CARDS',IRC)
IF(IRC.NE.0) PRINT *,'Error issuing RM command'
CALL XZLRM (FILE,IRC)
- FILE
- Character variable specifying the name of the file to be removed.
- IRC
- Integer variable in which the return code is returned.
This routine issues deletes the specified file on the local system.
Example of using the XZLRM routine
CALL XZLRM('CSPACK.CARDS',IRC)
IF(IRC.NE.0) PRINT *,'Error issuing RM command'
Next: TELNETG and TAG++
Up: FORTRAN callable interface
Previous: General utility routines
Janne Saarela
Tue May 16 09:22:05 METDST 1995