IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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: 75

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: 7309
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: 75

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: 75

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

by the way the Concept of NULL seems to be there in JCL
publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.ieab600/whtthfu.htm
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
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
publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.ieab600/whtthfu.htm


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

 


Similar Topics
Topic Forum Replies
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Uploading from desktop, a CSV file, s... DB2 2
No new posts How to handle NULL in COBOL program COBOL Programming 8
No new posts Change NULL indicator in UNLOAD utility DB2 2
Search our Forums:

Back to Top