Formato de prestamo de equipo
vamphir_oApuntes12 de Mayo de 2017
2.171 Palabras (9 Páginas)536 Visitas
Eric, cheque una macro que estuve viendo con anterioridad y esta macro dependiendo de varias cosas corre un proceso para generar archivos y que posteriormente los transfiere al equipo IBM para que se impriman Estados de Cuenta.
Después de generar el archivo, se ejecuta una subutina de SEND_CONECT que ejecuta el programa $DATA24.NDMOBJ.NDMCOM pasandole ciertos parámetros dentro de los cuales se le da el nombre del archivo generado denominado SOURCE-FILE y el nombre del archivo que se deja en el IBM denominado DEST.FILE, posteriormente se checa si fue satisfactorio el envio.
Te paso la rutina SEND_CONECT para que cheques si es similar el proceso que tienes.
?SECTION SEND_CONNECT ROUTINE
== =================
== ================= RUTINA DE TRANSFERENCIA VIA CONNECT DIRECT
== ================= CON COMANDO DIRECTO EN CONNECT DIRECT
==
#OUTPUT ENVIO A CONNECT DIRECT
#OUTPUT ORIGEN [SOURCE^FILE]
#OUTPUT DESTINO [DEST^FILE]
#OUTPUT SCRIPT [SCRIPT]
== #DELAY 6000
RUN $DATA24.NDMOBJ.NDMCOM / OUTV OUTCONEC/ ;SUB PROC=[SCRIPT] &
&LOCALFILE=[SOURCE^FILE] &
&REMOTEFILE=[DEST^FILE] ;EXIT
#LINEDEL OUTCONEC 1 TO 26
#SETMANY J1 J2 J3 J4 J5 J6 J7, [#EXTRACT OUTCONEC]
#OUTPUT J1 [J1]
#OUTPUT J2 [J2]
#OUTPUT J3 [J3]
#OUTPUT J4 [J4]
#OUTPUT J5 [J5]
#OUTPUT J6 [J6]
#OUTPUT J7 [J7]
#DELAY 6000
[#IF "[J3]" '=' "successfully." |THEN|
#OUTPUT [Clear^Screen]
#OUTPUT [LINE^1]
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT [COL] " Se ha generado la solicitud a Connect Direct "
#OUTPUT [COL] " Con el numero : [J7] "
#DELAY 300
#OUTPUT [Clear^Screen]
#OUTPUT [LINE^1]
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT [COL] " Espere.. estoy haciendo la transferencia a IBM "
#DELAY 1000
$DATA24.NDMOBJ.NDMCOM /OUTV OUT/;SEL STAT PNUMBER=[J7] STEPEND;EXIT
#LINEDEL OUT 1 TO 24
#OUTPUT [Clear^Screen]
OUTVAR OUT
#DELAY 1000
|else|
#OUTPUT [Clear^Screen]
#OUTPUT [LINE^1]
#OUTPUT
#OUTPUT
#OUTPUT
#OUTPUT [LINE^20]
#OUTPUT [LINE^21]
#DELAY 1000
] == end if
#RETURN
Status Key 2
The rightmost character position of the file-status data item is known as Status Key 2
and further describes the results of an input-output operation.
Table 8-5. I-O Status Code Meanings: Successful Completion
I-O Status codes File Exception Condition
“00” The input-output statement executed successfully, and no further
information concerning the input-output operation is available.
“02” The input-output statement executed successfully, but a duplicate key
is detected in one of the following ways:
∙ For a READ statement, the key value for the current key of
reference is equal to the value of that same key in the next record
within the current key of reference
∙ For a REWRITE or WRITE statement, the record just written
created a duplicate key value for at least one alternate record key
for which duplicates are allowed.
“04” A READ statement executed successfully, but the length of the record
being processed does not conform to the fixed file attributes for that
file.
“05” The input-output statement executed successfully; however, for an
OPEN statement, the referenced optional file is not present at the time
the OPEN statement is executed (if the open mode is I-O or
EXTEND, the file has been created).
“07” The input-output statement executed successfully, but a requested
option could not be done for of one of these reasons:
∙ For a CLOSE statement with the NO REWIND, REEL or UNIT
REMOVAL phrase or for an OPEN statement with the NO
REWIND phrase, the referenced file does not reside on a
reel/unit medium.
∙ For an OPEN statement that references a file that qualifies for
Fast I-O, sufficient memory for Fast I-O was not available.
“97” The input-output statement is successfully executed, but the
circumstances were not entirely as expected.
For an OPEN statement, either the referenced file has labels and
LABEL RECORDS OMITTED was specified, or it does not have
labels and LABEL RECORDS STANDARD was specified.
For a READ statement, the retrieved record is currently locked,
whether through some other file name of the run unit or by some
other process.
For a START statement, the start operation performed a read
operation to validate a position, and the record that was read was
locked.
Procedure Division
COBOL85 Manual–134543
8-33
I-O Status Code
Table 8-6. I-O Status Code Meanings: Unsuccessful Completion—
At-End Condition
I-O Status codes File Exception Condition
“10” A sequential READ statement is attempted and no next logical record
exists in the file because the logical end of the file has been reached.
“14” A sequential READ statement is attempted for a relative file, but the
relative record number cannot be assigned to the relative key data
...