Suppose you are adding a new field in a map, and that field
should also be added as a new column in DB2 table. How do
you implement this? what is the impact analysis u will do?
SET is the ANSI standard for variable assignment, SELECT is
not.
SET can only assign one variable at a time, SELECT can make
multiple assignments at once.
If assigning from a query, SET can only assign a scalar
value. If the query returns multiple values/rows then SET
will raise an error. SELECT will assign one of the values
to the variable and hide the fact that multiple values were
returned (so you'd likely never know why something was
going wrong elsewhere - have fun troubleshooting that one)
When assigning from a query if there is no value returned
then SET will assign NULL, where SELECT will not make the
assignment at all (so the variable will not be changed from
it's previous value)
As far as speed differences - there are no direct
differences between SET and SELECT. However SELECT's
ability to make multiple assignments in one shot does give
it a slight speed advantage over SET.
7
How to declare the length of emp no in the physilcal file
and the mandatory length is 6 i.e. Emp No should be
numeric, mandatory and fill all the 6 places
7
What is task control and what are the CICS commands
associated with it?
251
Is it rquired any server for Ibm framework? Give me list of
Ibm framework & recent version IBm framework?
Hi,
While I am trying to produce a html report from SAS
interactive screen, I am always getting an error. I have
attached the result of interactive execution with this.
Please help me on this.
NOTE: All profile changes will be lost at the end of the
session.
1 *libname
ia 'U19K.CAPS.SAS';
2
3 /*Data
declaration*/
4 data
work.staff;
5 infile 'U19K.CAPS.SAS
(RAWDATA1)';
6 input LastName $ 1-10 FirstName $ 11-
20
7 JobTitle $ 21-23 Salary 24-
28
8 BirthDat $ 29-37 Gender $
38
9
run;
10
11 /*Basic "format"
statement*/
12 /*assign range of values to a variable and use
it*/
13 /*'$' should be used for a alphanumeric
manipulation*/
NOTE: The infile 'U19K.CAPS.SAS(RAWDATA1)'
is:
Dsname=U19K.CAPS.SAS
(RAWDATA1),
Unit=3390,Volume=XTD007,Disp=SHR,Blksize=6160,
Lrecl=80,Recfm=FB
NOTE: 20 records were read from the infile 'U19K.CAPS.SAS
(RAWDATA1)'.
NOTE: The data set WORK.STAFF has 20 observations and 7
variables.
NOTE: The DATA statement used 0.01 CPU seconds and
7537K.
NOTE: The address space has used a maximum of 3676K below
the line and
15196K above the
line.
14 proc
format;
15 value Salrange low-
10000='Below'
16 10001-
20000='Medium'
17 20001-
High='Above';
NOTE: Format SALRANGE has been
output.
18 value $Gender
F='Female'
19
M='Male';
NOTE: Format ÅGENDER has been
output.
20
run;
NOTE: The PROCEDURE FORMAT used 0.00 CPU seconds and
7523K.
NOTE: The address space has used a maximum of 3676K below
the line and
15196K above the
line.
21
22 /*ODS-Output delivery system to create html
file*/
23 ods listing
close;
24 ods html file='C:\Documents and
Settings\u19k\Desktop\html1.html';
NOTE: Writing HTML Body file: C:\Documents
and
Settings\u19k\Desktop\html1.html
ERROR: Invalid file, C:\DOCUMENTS AND
SETTINGS\U19K\DESKTOP\HTML1.HTML.
WARNING: No body file. HTML output will not be
created.
25
26 /*Basic "label"
statement*/
27 proc print data=work.staff
split='';
28 label LastName='Last
Name'
29 FirstName='First
Name'
30 JobTitle='Job
Title'
31 Salary='Annual
Salary';
32 format Salary Salrange. Gender
$Gender.;
33 var LastName FirstName JobTitle Salary
Gender;
34 title 'Employee
database';
35
run;
WARNING: No output destinations
active.
NOTE: The PROCEDURE PRINT used 0.00 CPU seconds and
10275K.
NOTE: The address space has used a maximum of 3676K below
the line and
15196K above the
line.
36
37 /*ODS-html
closing*/
38 ods html
close;
39 ods
listing;
186
How can we increase the size of an existing PDS to include
more no. of modules.
31
Translation Time is not reduced if the Pre-compilation is
done first(True or False).
Which command is used to replace CDUP command in FTP IF i
WANT TO USE SFTP?
9
IDENTIFICATION DIVISION.
PROGRAM-ID. UPDT.
AUTHOR.anbu.
DATE-WRITTEN. AUG 13.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT CMSTR ASSIGN TO CINP1
ORGANIZATION IS INDEXED
ACCESS IS SEQUENTIAL
RECORD KEY CM2-KEY
FILE STATUS IS WS-CMSTR-FST.
SELECT CTAB ASSIGN TO CINP2
ORGANIZATION IS
ACCESS IS
SEQUENTIAL
RECORD KEY VSAM-WHSE-
KEY
FILE STATUS IS WS-CTAB-
FST.
DATA
DIVISION.
FILE
SECTION.
FD
CMSTR.
COPY
RXCYFC20.
FD
CTAB.
COPY
AITYWHSE.
************************************************************
******
*** WORKING STORAGE
VARIABLES ***
************************************************************
******
WORKING-STORAGE
SECTION.
01 WS-
VARIABLES.
05 WS-EB PIC X(02) VALUE
ZEROES.
05 WS-DIV PIC 9(03) VALUE
ZEROES.
05 WS-CMF-RECS-REWRITTEN PIC 9(01) VALUE
ZERO.
*** FILE STATUS
VARIABLES ***
05 WS-
FILESTATUS.
10 WS-CMSTR-FST PIC 9(02) VALUE
ZEROES.
10 WS-CTAB-FST PIC 9(02) VALUE
ZEROES.
*** END OF FILE
VARIABLES ***
05 WS-CMSTR-EOF PIC X(01)
VALUE 'N'.
88 WS-CMSTR-EOF-YES
VALUE 'Y'.
88 WS-CMSTR-EOF-NO
VALUE 'N'.
05 WS-CTAB-EOF PIC X(01)
VALUE 'N'.
88 WS-CTAB-EOF-YES
VALUE 'Y'.
88 WS-CTAB-EOF-NO
VALUE 'N'.
**** ERROR
VARIABLES ****
05 WC-ABEND-900 PIC 9(03) VALUE
900.
05 WE-ERR-CODE PIC 9(02) VALUE
ZEROES.
05 WE-ABEND-CODE PIC 9(03) VALUE
ZEROES.
************************************************************
****
********* PROCEDURE DIVISON
**********
************************************************************
****
PROCEDURE
DIVISION.
0000-
BEGIN.
PERFORM 1000-INITIALISE THRU 1000-
EXIT.
PERFORM 2000-PROCESS THRU 2000-
EXIT
UNTIL WS-CMSTR-EOF-
YES.
DISPLAY 'WS-CMF-RECS-REWRITTEN :' WS-CMF-RECS-
REWRITTEN.
PERFORM 5000-CLOSE THRU 5000-
EXIT.
GOBACK.
0000-
EXIT.
EXIT.
1000-
INITIALISE.
OPEN I-O
CMSTR.
EVALUATE WS-CMSTR-
FST
WHEN
00
WHEN 97
CONTINUE
WHEN OTHER
DISPLAY 'ERROR IN READING INPUT FILE: '
DISPLAY WS-CMSTR-FST
MOVE WS-CMSTR-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-EVALUATE.
OPEN INPUT CTAB.
EVALUATE WS-CTAB-FST
WHEN 00
WHEN 97
CONTINUE
WHEN OTHER
DISPLAY 'ERROR IN READING INPUT FILE: '
DISPLAY WS-CTAB-FST
MOVE WS-CTAB-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-EVALUATE.
1000-EXIT.
EXIT.
2000-PROCESS.
READ CMSTR.
EVALUATE WS-CMSTR-FST
WHEN 00
CONTINUE
WHEN 10
SET WS-CMSTR-EOF-YES TO TRUE
GO TO 2000-EXIT
WHEN OTHER
DISPLAY 'ERROR IN READING INPUT FILE: '
DISPLAY WS-CMSTR-FST
MOVE WS-CMSTR-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-EVALUATE
IF CM2-RECORD-TYPE-SOLD-TO
MOVE CM2-ENTERING-BRANCH TO WS-EB
PERFORM 3000-READ THRU 3000-EXIT
UNTIL WS-CTAB-EOF-YES
END-IF.
2000-EXIT.
EXIT.
3000-READ.
MOVE WS-EB TO VSAM-WHSE-CD.
MOVE 'WHSE' TO VSAM-WHSE-ID.
READ CTAB.
EVALUATE WS-CTAB-FST
WHEN 00
MOVE WHSE-DIV-CODE TO WS-DIV
PERFORM 4000-REWRITE-CMF THRU 4000-EXIT
WHEN 10
SET WS-CTAB-EOF-YES TO TRUE
GO TO 3000-EXIT
WHEN OTHER
DISPLAY 'ERROR IN READING TABLE FILE: '
DISPLAY WS-CTAB-FST
MOVE WS-CTAB-FST TO WE-ERR-CODE
PERFORM 9999-ABEND-PARA THRU 9999-EXIT
END-
EVALUATE.
3000-
EXIT.
EXIT.
4000-REWRITE-
CMF.
IF WS-DIV = 250 OR
252
MOVE 'F' TO CM2-FREIGHT-
TYPE
MOVE 1 TO CM2-FREIGHT-THRESHOLD-
AMT
ADD +1 TO WS-CMF-RECS-
REWRITTEN
REWRITE CM2-SOLD-TO-
RECORD
DISPLAY 'RECORD
UPDATED'
END-
IF.
* EVALUATE WS-CMSTR-
FST
* WHEN
00
*
CONTINUE
* WHEN
OTHER
* DISPLAY 'FILE NOT
UPDATED'
* DISPLAY WS-CMSTR-
FST
* MOVE WS-CMSTR-FST TO WE-ERR-CODE
* PERFORM 9999-ABEND-PARA THRU 9999-EXIT
* GO TO 4000-EXIT
* END-EVALUATE.
4000-EXIT.
EXIT.
5000-CLOSE.
CLOSE CMSTR
CTAB.
5000-EXIT.
EXIT.
9999-ABEND-PARA.
COMPUTE WE-ABEND-CODE = WC-ABEND-900 + WE-ERR-CODE
CALL 'ILBOABN0' USING WE-ABEND-CODE
GO TO 5000-CLOSE.
9999-EXIT.
EXIT.
5000-CLOSE.
CLOSE CMSTR
CTAB.
5000-EXIT.
EXIT.
9999-ABEND-PARA.
COMPUTE WE-ABEND-CODE = WC-ABEND-900 + WE-ERR-CODE
CALL 'ILBOABN0' USING WE-ABEND-CODE
GO TO 5000-CLOSE.
9999-EXIT.
EXIT.
//this program is giving maxcc=0, but not updating..
50
Q:HI friends accually ihave one problem plesase let me know
the alternate code of this code.
Related field description of code:
Add a field, CALvsPRD, "Calendar Day Starts Before/After
Production Day" to the parameter set WRKORDER which accepts
values 'A' or 'B'
o B = Calendar Day Starts Before Production Day
o A = Calendar Day Starts After Production Day
o Any other value indicates the production and
calendar dates are always the same.
code:
Automatic Execution Of *INZSR Subroutine
/Z01 * retrieves WRKORDER field values.
/Z01 * Calculate default Production Date and return it to
caller.
/Z01 * Production date defaults to system date
/Z01 C Eval P@Pdate = %DATE()
/Z01 * unless Calendar date starts Before PDN(production)
date and
/Z01 * system time is before PDN Start Time then
/Z01 * PDN date is yesterday.
/Z01 C If W@CALvsPRD = 'B'
and
/Z01 C %TIME() < %TIME
(W@Strtime)
/Z01 C Eval P@Pdate -= %Day(1)
/Z01 * unless Calendar date starts After PDN date and
/Z01 * system time is *GE PDN(production) Start Time then
/Z01 * PDN date is tomorrow.
/Z01 C ElseIf W@CALvsPRD = 'A' and
W@Strtime > *Zero and
/Z01 C %TIME() >= %TIME
(W@STrtime)
/Z01 C Eval P@Pdate += %Day(1)
/Z01 C
EndIf
/Z01 C Eval *InLr = *On
I want to code a REXX Program in order to load many tables
in a database simultaneously in a batch fashion. Currently
batch codes ar available in which only one job is submitted
at a time and this loads only one table. My requirement is
that many tables should be loaded at a time when one Job is
submitted and can this be done using REXX Tool??? I want
code snippet or the coding for this , please