View previous topic :: View next topic
|
Author |
Message |
sachin_kaushik84
New User
Joined: 03 Oct 2008 Posts: 23 Location: noida
|
|
|
|
1. Can we declare temporary dataset without name?
2. How can we declare a db2 data type(varchar) filelds in the cobol declaration?
3. Suppose we have a proc step,
//step1 exec procname
//d1 dd dsn=dsn1
// dd dsn=dsn2
// dd dsn=dsn3
// dd dsn=dsn4
How can we override dsn2 from job?
4. what is the datatype of S9(4)A(4) variable?
5. can redefines come before the occurs clause or vice versa?
6. In a Job there r 100 steps how can we execute only 28 , 60 ,and 96 steps ?
7. Can Proc A call to B and B TO C and C To A? Is it possible? I mean to say is to possible to call proc from another proc? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Topic moved to correct forum. |
|
Back to top |
|
|
mambopras
New User
Joined: 11 Nov 2008 Posts: 52 Location: Hyderabad
|
|
|
|
1) yes we can declare a temporary dataset without name it would be decalred as &&temp |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
mambopras wrote: |
1) yes we can declare a temporary dataset without name it would be decalred as &&temp |
I suggest that you try a DD with no DSN and see what the OS really generates. |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Hi.
2.
Code: |
01 Var.
05 VAR-LENGTH PIC S9(4) COMP.
05 VAR-DATA. PIC X(SIZE)
|
3.
Code: |
//STEP1.D1 DD DSN=DUMMY,
// DD DSN=dsn2,DISP=SHR
|
Correct me If I am worng .. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
dp33770 wrote: |
3.
Code: |
//STEP1.D1 DD DSN=DUMMY,
// DD DSN=dsn2,DISP=SHR
|
Correct me if I am wrong ... |
The DD is a concatenation rather than a single dataset and special care is needed. The first DD DUMMY in your reply will end the concatenation. Also, the question was to override dsn2 from the step.
Code: |
//STEP1.D1 DD
// DD DSN=dsn3
// DD DSN=dsn4
|
|
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi DeeP,
You wrote:
Quote: |
Code:
01 Var.
05 VAR-LENGTH PIC S9(4) COMP.
05 VAR-DATA. PIC X(SIZE).
|
As I remember a DB2 Var Char was defined:
Code: |
01 Var.
49 VAR-LENGTH PIC S9(4) COMP.
49 VAR-DATA. PIC X(SIZE). |
Unless they changed it. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Quote: |
4. what is the datatype of S9(4)A(4) variable? |
The datatype is invalid - it won't compile. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The presence of the S in the field causes it to be invalid and flagged with an S level compiler error. I tested a PIC 9(4)A(4) field (without the S) and that compiles fine. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
expat,
For overriding the 2nd dataset in the concatenation, should n't it be something like this.
Code: |
//STEP1.D1 DD
// DD DSN=new-dataset
// DD
// DD |
|
|
Back to top |
|
|
|