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

How do i verify the char field is having (All x"00")


 
IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raghu M N

New User


Joined: 12 Mar 2018
Posts: 2
Location: India

PostPosted: Tue Sep 22, 2020 9:26 pm
Reply with quote

I am trying to check if the QID = '' (CHAR(26)) in below code and the value is All x"00" in input. Now flow is going to else part instead of going in if part.

Then i tried assigning QID = '' checking if NULL and its not working. Could some one please help me in finding better solution.

i want the flow to go in IF case.

Input:
Code:
1 MI
  05 QID_IN       All x"00"

DCL QID_IN                 CHAR (26);
DCL QID_PTR      PTR INIT (ADDR(QID_IN));

DCL  (NULL) BUILTIN;

IF QID_IN_PTR = NULL then do;   
         QID_IN = '';
 END;
IF QID_IN = '' then do;
   CALL QO_COLLECT;
END;
ELSE DO;
   CALL QO_EXPO_STATUS;
END;

Coded for you - next time do it yourself
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1226
Location: Vilnius, Lithuania

PostPosted: Tue Sep 22, 2020 10:04 pm
Reply with quote

Maybe you should start by RTFM.

The NULL() builtin function has abso-f*ck-ingly nothing to do with '00'x characters. And while you're at it, also look at string repetition factors, or the LOW() builtin function.

And don't post in a forum for experts when you're obviously totally clueless.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts XML Parsing in COBOL creating "h... COBOL Programming 0
No new posts BMS map length field greater than zero CICS 3
No new posts Break a record into fields, each fiel... SYNCSORT 2
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... SYNCSORT 10
No new posts COnvert a column with mix of hex ,cha... DB2 5

Back to Top