Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can JP1, JP2, etc be null

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
harisukumaran

New User


Joined: 14 Jun 2005
Posts: 33

PostPosted: Thu Aug 01, 2013 2:37 am    Post subject: Can JP1, JP2, etc be null
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    Post subject: Reply to: Can JP1, JP2, etc be null
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Aug 01, 2013 2:59 am    Post subject: Reply to: Can JP1, JP2, etc be null
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: 33

PostPosted: Thu Aug 01, 2013 4:05 am    Post subject:
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: 33

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

by the way the Concept of NULL seems to be there in JCL
http://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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Aug 01, 2013 5:04 am    Post subject: Reply to: Can JP1, JP2, etc be null
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    Post subject:
Reply with quote

harisukumaran wrote:
by the way the Concept of NULL seems to be there in JCL
http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts GetObjectArrayElement returns NULL Majid Hussain Java & MQSeries 2 Wed Mar 30, 2016 2:59 am
No new posts Query to select Null row on priority RahulG31 DB2 24 Thu Jan 21, 2016 5:45 pm
No new posts Null Indicator value -2 means in Embe... deepak_shrivastava DB2 2 Wed Jan 06, 2016 10:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us