IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Replace all low values in certain fields by SPACES


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 98
Location: Spain

PostPosted: Thu Feb 04, 2010 6:17 pm
Reply with quote

Hello there. I have to replace all low values in certain fields after an outrec operation and I though on using the Change operator to change all X'00' bytes by X'40' but I can't seem to be able to make it work

In particular I have this input file:

Positions 1 through 523, some non important data
Positions 524, 300 bytes, some variable length data in which there can be low values after the relevant data. As an example:

The 300 Bytes fields:

Code:

7...............................................................................
8...............................................................................
9...............................................................................
10..............................................................................
11..............................................................................
12..............................................................................
13..............................................................................
14..............................................................................
15..............................................................................
16..............................................................................
17..............................................................................
18..............................................................................
19..............................................................................
20..............................................................................
21..............................................................................
22..............................................................................
23..............................................................................
24..............................................................................
25..............................................................................
26..............................................................................
27..............................................................................
28..............................................................................
29..............................................................................
30..............................................................................
31..............................................................................
32..............................................................................
2010-02-28......................................................................
2010-03-31......................................................................
2010-04-30......................................................................
2010-05-31......................................................................
2010-06-30......................................................................
2010-07-31......................................................................
2010-08-31......................................................................
2010-09-30......................................................................


Position 824 onwards, the rest of the record

I have this step coded, but I keep getting errors on it.

Code:
//PASO055  EXEC PGM=SORT                                       
//SORTIN   DD DSN=MDDS.CU.BAT1SBAS.DCD0.BD01001.D100203,DISP=SHR
//SORTOUT  DD DSN=MDDS.CU.BAT1SBAS.DCD0.BD01004.DTEST,         
//            DISP=(NEW,CATLG,DELETE),                         
//            DCB=(RECFM=FB,BLKSIZE=0),                         
//            SPACE=(CYL,(100,10),RLSE),UNIT=SYSDA             
//SYSOUT   DD SYSOUT=*                                         
//SYSPRINT DD SYSOUT=*                                         
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                             
   OUTREC FIELDS=(1,521,                                       
                  524,300,CHANGE=(1,X'00',X'40'),               
                  824,6,PD,M10,LENGTH=10,                       
                  830,6,PD,M10,LENGTH=10,                       
                  836,10,                                       
                  846,6,PD,M10,LENGTH=10,                       
                  852,7,PD,M10,LENGTH=10,                       
                  859,3)                                       



The output refers to sintax code errors, but i can't find them...

Code:
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 13:13 ON THU FEB
            SORT FIELDS=COPY                                                   
             OUTREC FIELDS=(1,521,                                             
                            524,300,CHANGE=(1,X'00',X'40'),                     
                                     $                                         
ICE111A E REFORMATTING FIELD ERROR                                             
                            824,6,PD,M10,LENGTH=10,                             
                            $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                            830,6,PD,M10,LENGTH=10,                             
                            $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                            836,10,                                             
                            $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                            846,6,PD,M10,LENGTH=10,                             
                            $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                            852,7,PD,M10,LENGTH=10,                             
                            $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                            859,3)                                             
                            $                                                   
ICE007A 0 SYNTAX ERROR                                                         
                                                                               
                                                                               
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E7-K44563                     
ICE052I 3 END OF DFSORT                                                         


Any thoughs about it? Is there any way to change it? I lookd through the errors document for the code ICE111A but i can't quite get exactly what is going on

Thanks in advance

Best regards

Oliver
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 04, 2010 6:48 pm
Reply with quote

Hi,
Check these two examples..
Second one has findrep example too
www.ibmmainframes.com/viewtopic.php?t=15848&highlight=low+values+space+replace
www.ibmmainframes.com/viewtopic.php?t=3053&highlight=low+values+space+replace
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 98
Location: Spain

PostPosted: Thu Feb 04, 2010 8:55 pm
Reply with quote

Hello there! thanks for the reply!

I was able to solve reading this Post

In the end, i used this sort card:

Code:
  SORT FIELDS=COPY                               
    INREC FIELDS=(1,521,                         
                  524,300,                       
                  824,6,PD,M10,LENGTH=10,       
                  830,6,PD,M10,LENGTH=10,       
                  836,10,                       
                  846,6,PD,M10,LENGTH=10,       
                  852,7,PD,M10,LENGTH=10,       
                  859,3)                         
    OUTREC FINDREP=(IN=(X'00',X'4B'),OUT=(X'40'))


It worked perfectly! thanks!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Feb 05, 2010 11:20 pm
Reply with quote

Code:

            OUTREC FIELDS=(1,521,                                             
                            524,300,CHANGE=(1,X'00',X'40'),                     
                                     $                                         
ICE111A E REFORMATTING FIELD ERROR           


FYI, the syntax error was issued because of the length of 300. For p,m,CHANGE=(...) the limit for m is 64.
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 98
Location: Spain

PostPosted: Thu Feb 18, 2010 2:22 pm
Reply with quote

Frank Yaeger wrote:
Code:

            OUTREC FIELDS=(1,521,                                             
                            524,300,CHANGE=(1,X'00',X'40'),                     
                                     $                                         
ICE111A E REFORMATTING FIELD ERROR           


FYI, the syntax error was issued because of the length of 300. For p,m,CHANGE=(...) the limit for m is 64.


Ahhh... thats good to know... As usual, thanks a lot for your feedback Frank

Best Regards!

Oliver
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top