View previous topic :: View next topic
|
Author |
Message |
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
I am creating some procs that take advantage of the use of JCL symbolics in DFSORT
DFSORT returns error when I don't pass values to any of the variables. Can i not have them as null ? |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
harisukumaran,
There is no concept of NULL in JCL or DFSORT. You need to explain what you meant by null. If your procedures are using symbolics then code the symbolics as a single space. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why don't you post the JCL for the step and they sysout for the step, so we can see what you mean, please? |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
|
|
Case1
=====
Code: |
//JS000100 EXEC PROC1,
// SYMB1=AAAA,
// SYMB2=BBBB |
Expected output:
AAAABBBB
Case2
=====
Code: |
//JS000100 EXEC PROC1,
// SYMB2=BBBB
|
Expected output:
BBBB
Would this be possible with DFSORT ?
If I put SYMB1=' ' in the PROC statement ?
It will result in
one blank in column 1
PROC1
======
Code: |
//PROC1 PROC SYMB1=,
// SYMB2=,
.
.
.
//PS000300 EXEC PGM=SORT,COND=(0,LT),
// PARM='JP1"&SYMB1",JP2"&SYMB2"'
//DD1 DD SYSOUT=*
.
.
.
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=DD1,
HEADER1=(JP1,JP2),
NODETAIL,REMOVECC |
Code'd |
|
Back to top |
|
|
harisukumaran
New User
Joined: 14 Jun 2005 Posts: 75
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Please show JCL, Control Cards, full sysout from the step where you got an error. Sample input. Expected output. All in the Code tags please (your first post has been Code'd, please do it yourself this time). |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Thanks for the link. My apologies if I misunderstood your initial requirement. I was under the impression that you are talking about NULL values of DB2.
You can have NULL string but it is only limited to certain DFSORT parms. EX: FINDREP.
Code: |
// SET NULLVL1=''
//STEP0100 EXEC PGM=SORT,PARM='JP1"&NULLVL1"'
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC FINDREP=(INOUT=(C'ABC',JP1))
//* |
But you canNOT have
Code: |
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,3,CH,EQ,JP1)
//* |
or
Code: |
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(30:JP1)
//* |
In your intention is to not pass certain parms then you need to pass the string with atleast a space and do a bit of formatting using SQZ or JFY depending on how you want the results to be. |
|
Back to top |
|
|
|