Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Why there is extra Characters in the output?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Thu Jul 26, 2007 1:41 pm    Post subject: Why there is extra Characters in the output?
Reply with quote

Hey Guys, Below is my test program it's working fine

Code:
TEST03: PROC OPTIONS(MAIN) REORDER;                               
/**/                                                             
DCL ( SUBSTR,                                                     
       DATE,                                                     
       PLIDUMP,                                                   
       TIME) BUILTIN;                                             
DCL SYSPRINT FILE OUTPUT STREAM PRINT;                           
DCL XDATE EXT ENTRY OPTIONS(ASM RETCODE INTER);                   
/**/                                                             
DCL BLKIN        FILE  INPUT RECORD ENV(FB RECSIZE(80) TOTAL);   
DCL BLKOT        FILE  OUTPUT RECORD ENV(FB RECSIZE(80) TOTAL);   
DCL EOF_BLKIN               BIT(1) ALIGNED   INIT('0'B);         
DCL WS_VAR                      CHAR (80) INIT ('');             
DCL DATE_PARS              PIC '99999';                           
DCL 1 WS_STR             BASED(ADDR(WS_VAR)),                     
        5  WS_BATCH                   CHAR (3),         
        5  FILLER1                    CHAR (1),         
        5  WS_DATE                    CHAR (8),         
        5  FILLER2                    CHAR(68) INIT ('');     
/**/                                                         
    ON ENDFILE (BLKIN) EOF_BLKIN = '1'B;                     
    ON ERROR SNAP                                             
    BEGIN;                                                   
      ON ERROR SYSTEM;                                           
      PUT SKIP DATA(BLKIN_IN);                               
    END;                                                     
        OPEN FILE (BLKIN) TITLE ('STEPIN');                   
        OPEN FILE (BLKOT) TITLE ('STEPOUT');                 
/**/                                                         
      FETCH XDATE;                                           
      READ FILE (BLKIN) INTO (WS_VAR);                       
                       
      SELECT (WS_BATCH);                                     
             WHEN ('B01')                                     
               DO;                                           
               WS_BATCH = 'B02';                                         
               CALL XDATE ('MMDDYYYY',WS_DATE,'PARSD',DATE_PARS); 
               DATE_PARS = DATE_PARS + 1;                     
               CALL XDATE ('PARSD',DATE_PARS,'MMDDYYYY',WS_DATE);
               END;                                           
          WHEN ('B02')                                       
               WS_BATCH = 'B01';                             
          OTHERWISE                                           
               PUT SKIP LIST ('INVALID BATCH NO.');           
   END;                                                       
   WRITE FILE (BLKOT) FROM (WS_VAR);                         
   /**/           
 END TEST03;


But I am getting some extra characters in the output. See the files below

Code:
 INPUT : B01 02292008


Code:
 OUTPUT : B02 02292008h.


I will really appreciate if any one can please explain why this is so and what should do to avoid these.

Thanks
Bhim
Back to top
View user's profile Send private message

anbesivam

New User


Joined: 22 Aug 2006
Posts: 5

PostPosted: Thu Jul 26, 2007 10:39 pm    Post subject: Re: Why there is extra Characters in the output?
Reply with quote

Hi bhim_s,

May be this is because of your XDATE assembler program. Did you checked your assembler program's return values separately ?
Back to top
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Fri Aug 31, 2007 7:30 pm    Post subject:
Reply with quote

got the solution when i Initialize filler2 with blanks after xdate call.

Code:

CALL XDATE ('PARSD',DATE_PARS,'MMDDYYYY',WS_DATE); 
FILLER2 = '';   
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us