IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Can JP1, JP2, etc be null


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harisukumaran

New User


Joined: 14 Jun 2005
Posts: 65

PostPosted: Thu Aug 01, 2013 2:37 am
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Aug 01, 2013 2:53 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Thu Aug 01, 2013 2:59 am
Reply with quote

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
View user's profile Send private message
harisukumaran

New User


Joined: 14 Jun 2005
Posts: 65

PostPosted: Thu Aug 01, 2013 4:05 am
Reply with quote

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
Code:
 BBBB

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
View user's profile Send private message
harisukumaran

New User


Joined: 14 Jun 2005
Posts: 65

PostPosted: Thu Aug 01, 2013 4:28 am
Reply with quote

by the way the Concept of NULL seems to be there in JCL
Use [URL] BBCode for Links
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Thu Aug 01, 2013 5:04 am
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Aug 02, 2013 11:26 pm
Reply with quote

harisukumaran wrote:
by the way the Concept of NULL seems to be there in JCL
Use [URL] BBCode for Links


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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts How to handle NULL in COBOL program COBOL Programming 8
No new posts Change NULL indicator in UNLOAD utility DB2 2
No new posts DB2 NULL Values display DB2 3
No new posts Fileaid Update Replace with null string Compuware & Other Tools 4
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... DB2 5

Back to Top