INFILE PSBname DLI options;
'GU
'
). It must be a valid update call function for any DL/I PUT statement execution (for example, 'REPL'
).
The following table shows the calls executed by DL/I INPUT statements
and those executed by DL/I
PUT statements.
DL/I INPUT Statement
|
DL/I PUT Statement
|
---|---|
GU
|
ISRT
|
GHU
|
REPL
|
GN
|
DLET
|
GHN
|
CHKP
|
GNP
|
ROLL
|
GHNP
|
ROLB
|
GCMD
|
CHNG
|
STAT
|
LOG
|
POS
|
PURG
|
CMD
|
|
DEQ
|
|
FLD
|
|
OPEN
|
|
CLSE
|
input @1 ll pib2. @3 loan_num @10 terms;
dbdname=substr(pcbmask,1,8);
seglev=input(substr(pcbmask,9,2),ib2.);
Bytes
|
Description
|
---|---|
1–8
|
These bytes of the PCBF= variable contain the DBD name.
|
9–10
|
The level number of the last segment accessed is contained in bytes 9 and 10 in IB2.
format. Level number refers to a
segment's level in the hierarchical structure. For example, your program might issue a qualified GN call with these SSAs:
CUSTOMER*D-(SSNUMBER =667-73-8275) CHCKACCT*D- (ACNUMBER =345620145345) CHCKCRDT (CRDTDATE =033195) If segments exist to satisfy the CUSTOMER and CHCKACCT SSAs but there is no CHCKCRDT
segment with a CRDTDATE field value of 033195, the last segment accessed is the CHCKACCT
segment. CHCKACCT is at
the second level of the hierarchy. Therefore, the level number is 2.
|
11–12
|
The DL/I status code is contained in these bytes of the PCBF= variable. The status
code can also be obtained by specifying the STATUS= option.
|
13–16
|
Bytes 13–16 contain the DL/I processing options defined for this PCB in the PSBGEN with the PROCOPT= parameter.
|
17–24
|
These bytes contain the name of the last segment accessed. (Normally, the reserved
area of the PCB mask occupies bytes 17–20, but the reserved data has been removed.)
Consider the example
for the level number of data in bytes 9–10. In that example there are SSAs for CUSTOMER,
CHCKACCT, and CHCKCRDT segments. However, only the SSAs for CUSTOMER and CHCKACCT
are satisfied. Since CHCKACCT is the last segment accessed, these bytes contain a
value of CHCKACCT.
The name of the last segment accessed can also be obtained from the variable specified
by the SEGMENT= option.
|
25–28
|
The length of the key feedback data is contained in these bytes in IB4. format. The key feedback data is described in
this table under bytes 33–200.
|
29-32
|
The number of sensitive segments in the PCB is contained in these bytes in IB4. format.
For example, if you use a PCB that defines
CUSTOMER and SAVEACCT as sensitive segments, these bytes contain a value of 2.
|
33–200
|
The key feedback datais contained in bytes 33–200. Key feedback data consists of the key field of the last segment accessed and the key field of each segment along the path to
the last segment. This is also called the concatenated key. For example, if you issue a GN call qualified with SSAs for the CUSTOMER and CHCKACCT
segments, the concatenated key consists of the values from the SSNUMBER field of the
CUSTOMER segment and the ACNUMBER field of the CHCKACCT segment.
The maximum length of the PCBF= variable is 200. Since 32 of the 200 bytes are used
by other data from the PCB mask, the maximum length of the key feedback data in the
PCBF= variable is 168 bytes. If the length of the concatenated key is greater
than 168 bytes, the data is truncated. (However, the value in bytes 25–28 reflects
the actual length, not the truncated length.)
|
SAVEACCT*D-(ACNUMBER =345620145345) SAVECRDT(CRDTDATE =033195)
GB
(end-of-file)
and branch to the labeled statements.
Option
|
Purpose
|
Default
|
Comments
|
---|---|---|---|
CALL= variable
|
specifies variable containing call function
|
GN (get-next)
|
required to change call
function from default
|
DBNAME= variable
|
specifies which eligible database PCB to use
|
not applicable
|
overrides PCB= option if variable value is nonblank
|
DLI
|
indicates DL/I resource is data source
|
not applicable
|
required; must follow PSB name
|
FSARC= variable
|
specifies variable containing FSA status codes
|
not applicable
|
z/OS IMS/VS Fast Path
FLD calls only
|
LENGTH= variable
|
specifies variable containing length of returned segment(s)
|
not applicable
|
|
LRECL= length
|
specifies length of
I/O buffers
|
1000 bytes
|
if too short, unpredictable
results might occur
|
PCB= variable
|
specifies variable containing numeric index to choose eligible PCB
|
not applicable
|
|
PCBF= variable
|
specifies variable containing PCB feedback data
|
not applicable
|
|
PCBNO=n
|
defines first eligible PCB
|
1
|
|
PSBname
|
specifies PSB to use
|
not applicable
|
required; must follow
INFILE keyword; cannot match active fileref or ddname
|
SEGMENT= variable
|
specifies variable containing last segment accessed
|
not applicable
|
segment name also available through PCBF= variable
|
SSA= variable or
(variable, variable,.
. .)
|
specifies 1 to 15 variables
containing SSAs
|
not applicable
|
must have length defined
before INFILE execution
|
EOF= label
|
specifies label for
subroutine executed at end-of-file
|
not applicable
|
for sequential access
only
|
MISSOVER
|
assigns missing values
for missing data
|
yes
|
forced for DL/I INFILE, does not have to be specified
|
OBS=n
|
specifies maximum number
of get calls
|
not applicable
|
|
START= variable
|
specifies variable containing start column for _INFILE_
|
not applicable
|
|
STOPOVER
|
stops processing if some variable values missing
|
not applicable
|
filename employ '<your.sas.employ>' disp=shr; data test (drop = socsec); ssa1 = 'CUSTOMER '; func = 'GN '; infile acctsam dli call=func ssa=ssa1 pcbno=3 status=st; input @1 soc_sec_number $char11. @12 customer_name $char40. @82 addr_line_2 $char30. @112 city $char28. @140 state $char2. @162 zip_code $char10. @172 home_phone $char12.; if st ¬= ' ' then link abendit; prt = 0; do until (soc_sec_number = socsec); infile employ ls=53 ; input @1 socsec $11. @13 employer $3.; if soc_sec_number = socsec then do until (st = 'GE'); infile acctsam dli; func = 'GNP '; ssa1 = 'SAVEACCT '; input @1 savings_account_number 12. @13 savings_amount pd5.2 @18 savings_date mmddyy6. @26 savings_balance pd5.2; if st = ' ' then do; output test; prt = 1; end; else if st = 'GE' then do; _error_ = 0; if prt = 0 then output test; end; else link abendit; end; end; return; abendit: file log; put _all_; abort; run; proc print data=test; title2 '2 Files Combined'; run; filename employ clear;
soc_sec_number = socsec
. Notice the
entire DL/I INFILE statement is not repeated; only the PSBname and
DLI are specified.
GB
status is returned from IMS
or an end-of-file is encountered when processing file Employ.
The SAS System 2 Files Combined soc_sec_ OBS number customer_name addr_line_2 city state 1 667-73-8275 WALLS, HOOPER J. 4525 CLARENDON RD RAPIDAN VA 2 434-62-1234 SUMMERS, MARY T. 4322 LEON ST. GORDONSVILLE VA 3 436-42-6394 BOOKER, APRIL M. 9712 WALLINGFORD PL. GORDONSVILLE VA 4 434-62-1224 SMITH, JAMES MARTIN 133 TOWNSEND ST. GORDONSVILLE VA 5 434-62-1224 SMITH, JAMES MARTIN 133 TOWNSEND ST. GORDONSVILLE VA 6 178-42-6534 PATTILLO, RODRIGUES 9712 COOK RD. ORANGE VA 7 156-45-5672 O'CONNOR, JOSEPH 235 MAIN ST. ORANGE VA 8 657-34-3245 BARNHARDT, PAMELA S. RT 2 BOX 324 CHARLOTTESVILLE VA 9 667-82-8275 COHEN, ABRAHAM 2345 DUKE ST. CHARLOTTESVILLE VA 10 456-45-3462 LITTLE, NANCY M. 4543 ELGIN AVE. RICHMOND VA 11 234-74-4612 WIKOWSKI, JONATHAN S. 4356 CAMPUS DRIVE RICHMOND VA savings_ account_ savings_ savings_ savings_ OBS zip_code home_phone prt employer number amount date balance 1 22215-5600 803-657-3098 0 AAA 459923888253 784.29 12870 672.63 2 26001-0670 803-657-1687 0 NBC 345689404732 8406.00 12869 8364.24 3 26001-0670 803-657-1346 0 CTG 144256844728 809.45 12863 1032.23 4 26001-0670 803-657-3437 0 CBS 345689473762 130.64 12857 261.64 5 26001-0670 803-657-3437 1 CBS 345689498217 9421.79 12858 9374.92 6 26042-1650 803-657-1346 0 UMW 345689462413 950.96 12857 946.23 7 26042-1650 803-657-5656 0 AFL 345689435776 136.40 12869 284.97 8 25804-0997 803-345-4346 0 ITT 859993641223 845.35 12860 2553.45 9 25804-0997 803-657-7435 0 IBM 884672297126 945.25 12868 793.25 10 26502-3317 803-657-3566 0 SAS 345689463822 929.24 12867 924.62 11 26502-5317 803-467-4587 0 UNC . . . .