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
 

 

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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm


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