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
 

 

Space is not exculded for VBA dataset in SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Wed Mar 11, 2009 9:28 pm    Post subject: Space is not exculded for VBA dataset in SORT
Reply with quote

Hi Everyone,
I am facing a problem in SORT program. The input file is VBA format. I have included a condition to omit the records, which have spaces in byte position number 3 to 23. But still I found records in output file, which have spaces in byte number 3 to 23.
I am not able to find any clue to solve this problem.

It will be very kind of you if you give some suggestion to solve this issue.

I have pasted the part of the JCl below:


Code:

//STPCHK3 EXEC PGM=SORT,PARM='VLTESTI=2'           
//SORTMSG DD SYSOUT=*                               
//SORTIN  DD DSN=TZF04CRE.SORT.INPUT,               
//           DISP=SHR                               
//EOS     DD DSN=TZF04CRE.SORT.OUTPUT,             
//           DISP=(,CATLG,DELETE),                 
//           SPACE=(CYL,(10,10),RLSE),             
//           MGMTCLAS=PROD     
//SYSOUT  DD SYSOUT=*                               
//SYSIN   DD *                                     
    SORT FIELDS=COPY                               
    OMIT COND=(05,01,CH,EQ,C'1',OR,                 
               07,05,CH,EQ,C'-----',OR,             
               07,20,CH,EQ,C'                    ')
    OUTFIL FNAMES=EOS,                             
    NULLOFL=RC4                                     
    END                                             
/*                                                 
//*       
                                         


Here the input file : TZF04CRE.SORT.INPUT is VBA and it has records which have spaces in bytes 3 to 23.

It will be great if you could suggest me how to omit those records with spaces.

From,
Raju kh
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 11, 2009 10:15 pm    Post subject:
Reply with quote

Hello,

You did add 4 for the rdw of the input (it looks like this has been done, but i thought i'd mention it)?

Are you sure the data is actually spaces and not some unprintable value? Have you looked at the data in hex?
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Mar 11, 2009 10:31 pm    Post subject:
Reply with quote

Perhaps the record ends in byte 2 (6 with RDW) so VLTESTI says it fails the test.
Back to top
View user's profile Send private message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Wed Mar 11, 2009 10:38 pm    Post subject: Reply to: Space is not exculded for VBA dataset in SORT
Reply with quote

Yes I do added 4 for RDW.

I have checked the data in hex , it show space only.

e.g: It show following format for record number 2 when I give HEX On. Therefor I can confirm that there is no unprintable value in it.

Code:

000002                                                         
       444444444444444444444444444444444444444444444444444444444
       000000000000000000000000000000000000000000000000000000000
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 11, 2009 11:55 pm    Post subject:
Reply with quote

Hello,

The problem may be because this
Code:
 07,20,CH,EQ,C'                    ')
is comparing a specified length of 20 with a literal that is 21 bytes. . .
Back to top
View user's profile Send private message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Thu Mar 12, 2009 2:28 pm    Post subject: Reply to: Space is not exculded for VBA dataset in SORT
Reply with quote

Hi
I have tried taking other simple example. But still I face same problem.
1) I create 1 dataset with VB formate.
2) I enter three records as follow:
Code:

****** ***************** Top of Data ******************
000001 1                 FIRST RECORD                                 
000002                                                               
000003 3  ITS HAS DATA IN THIS LINE                               
****** **************** Bottom of Data ****************

Here,
1st record: I place 1 in first byte and spaces from 5th position to 10th.
2nd Record: I placed spaces for this record.
3rd record : I place some data in byte posituin 5 to 10.

I got following output in output dataset:

Code:

****** ***************** Top of Data ******************
000001                                                               
000002 3  ITS HAS DATA IN THIS LINE                               
****** **************** Bottom of Data ****************


The first record in input file have same data in the 1 st byte. but it has sapces from byte number 5 to 10. so it got excluded. But for the second records it has only space for whole records but this reord is not excluded in the output file.

The part of JCl which i submit it:
Code:

//STPCHK3 EXEC PGM=SORT,PARM='VLTESTI=2'
//SORTMSG DD SYSOUT=*                   
//SORTIN  DD DSN=RE.TEST.INPUT,DISP=SHR 
//EOS     DD DSN=RF.TEST.OUTPUT,         
//           DSIP=(,CATLG,DELETE),       
//           SPACE=(CYL,(10,10),RLSE),   
//           RECFM=VBA,LRECL=80         
//SYSOUT  DD SYSOUT=*                   
//SYSIN   DD *                           
    SORT FIELDS=COPY                     
    OMIT COND=(09,05,CH,EQ,C'     ')     
    OUTFIL FNAMES=EOS,                   
    NULLOFL=RC4                         
    END                                 
/*                                       
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Mar 12, 2009 6:51 pm    Post subject:
Reply with quote

As I tried to tell you, record 2 is probably short and doesn't actually have "blanks". The variable records have the trailing blanks truncated even though ISPF EDIT displays that way with HEX ON.

Try adding a character on record 2 in position 24. That will actually leave blanks in the bytes between. Now run your sort.

To omit the short, blank lines you'd need to test the RDW in bytes 1-4 for a value of 5 or less (RDW + prtctl char).
Back to top
View user's profile Send private message
Khwairakpam Raju Singh

New User


Joined: 05 Dec 2007
Posts: 29
Location: Bangalore

PostPosted: Thu Mar 12, 2009 11:29 pm    Post subject: Reply to: Space is not exculded for VBA dataset in SORT
Reply with quote

Hi Bill,
I got your points. Thank you for your help.

When I tried checking for space in 1st byte position ( 5=RWD+1). It actually excluded the records with space.

like:
Code:

OMIT COND=(05,01,CH,EQ,C' ')


But now I am facing another problem as it got impacted in other records which have space in 1st byte (1+4=5) but actually have some data in other byte say from 20 to 30 byte position.

In this case is there any way to handle this issue in sort.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Fri Mar 13, 2009 3:16 pm    Post subject:
Reply with quote

Hello,

Bill was suggesting something like this to omit blank records. Did you try running your latest test with this.
Code:
//SYSIN    DD *         
 OPTION COPY           
 OMIT COND=(1,4,BI,LE,5)
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm


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