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

Change parameter in OUTREC


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

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Wed Jul 26, 2006 1:29 am
Reply with quote

The I/p file is a fixed file with LRECL 196 and O/p fixed with lrecl 30.

Code:
         
OUTREC FIELDS=(1:1,7,12,10,22,10,                     
              CHANGE=(10,C'          ',C'9999-12-31'),
              32,1,108,2)                     


Error :- RECORD TYPE IS F - DATA STARTS IN POSITION 1

I have tried various options..It's giving me the same error....
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: Wed Jul 26, 2006 1:47 am
Reply with quote

Quote:
Error :- RECORD TYPE IS F - DATA STARTS IN POSITION 1

I have tried various options..It's giving me the same error....


Huh? What makes you think that's an error? The message id is ICE201I which means it's an informational message. An error message would have an A at the end rather than an I.

I ran the equivalent of your job with DFSORT and got cc=0 - no errors.

If you're getting cc=16, then there would be an ICExxxA message for the actual error.
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Wed Jul 26, 2006 2:04 am
Reply with quote

Thanks very much Frank...I was just looking out for an non-existant error
The error is
Code:
ICE212A 0 MATCH NOT FOUND FOR *OUTREC  IFTHEN 0 CHANGE FIELD: POSITION 22


My requirement is to take no action when there is no match.The O/P should match the I/P....
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Wed Jul 26, 2006 2:15 am
Reply with quote

Frank,
Please inform me what's the sort parm required to resolve this

The error is

Code:
ICE212A 0 MATCH NOT FOUND FOR *OUTREC  IFTHEN 0 CHANGE FIELD: POSITION 22


My requirement is to take no action when there is no match.The O/P should match the I/P....
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: Wed Jul 26, 2006 2:24 am
Reply with quote

Ok, now that's an error message. You just need to use NOMATCH=(22,10) to do what you want:

Code:

  OUTREC FIELDS=(1:1,7,12,10,22,10,
              CHANGE=(10,C' ',C'9999-12-31'),
               NOMATCH=(22,10),
              32,1,108,2)


Note also that you only need one blank, not ten blanks, for the first CHANGE constant - DFSORT pads with blanks on the right to the specified length of 10.
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Wed Aug 23, 2006 3:47 pm
Reply with quote

In the below piece of sort . What will occur first Outrec or Sort..

Code:
SORT FIELDS=(1,7,CH,A,12,10,CH,A,22,10,CH,A)
OUTREC FIELDS=(1:1,7,12,10,22,10,
              CHANGE=(10,C' ',C'9999-12-31'),
               NOMATCH=(22,10),
              32,1,108,2)


Please inform me........
Back to top
View user's profile Send private message
senman

New User


Joined: 17 Aug 2006
Posts: 17
Location: Chennai

PostPosted: Wed Aug 23, 2006 5:43 pm
Reply with quote

First sort will be executed
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: Wed Aug 23, 2006 8:23 pm
Reply with quote

SORT is ALWAYS executed after INREC, but before OUTREC and OUTFIL.

For details of the order of processing of DFSORT control statements, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/1.5.4?DT=20060615185603#FIGSTMTSEQ
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Thu Aug 24, 2006 2:09 am
Reply with quote

Frank...
Code:
SORT FIELDS=(1,7,PD,A,8,10,CH,A,18,10,CH,A)               
INREC FIELDS=(1:1,7,12,10,32,1,                           
       CHANGE=(10,C'?',C'9999-12-31'),                     
       NOMATCH=(22,10),32,1,108,2)                         
INCLUDE COND=(108,2,CH,EQ,C'GB',AND,12,10,CH,NE,22,10,CH) 


how can I change the above sort it to INREC...since I need the sort to take place after the change.The Include has fields of O/p file
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: Thu Aug 24, 2006 2:35 am
Reply with quote

Look at the diagram - the order is:

INCLUDE COND
INREC BUILD (FIELDS)/OVERLAY/IFTHEN
SORT FIELDS
OUTREC BUILD (FIELDS)/OVERLAY/IFTHEN
OUTFIL INCLUDE/BUILD (OUTREC)/OVERLAY/IFTHEN

Quote:
how can I change the above sort it to INREC...since I need the sort to take place after the change.The Include has fields of O/p file


I don't understand what you're asking, but maybe this will answer your question anyway. (If not, explain in more detail what you want to do.)

If you want to include the records before they are sorted, use the INCLUDE statement. If you want to include the records after they are sorted, use the INCLUDE parameter of the OUTFIL statement.

If you want to make changes to the records before you sort them, use INREC. If you want to make changes to the records after you sort them, use OUTREC or OUTFIL.

For example: to sort, then change the sorted records, and then include on the changed records, use:

Code:

  SORT FIELDS=(1,7,PD,A,8,10,CH,A,18,10,CH,A)
  OUTREC FIELDS=(1:1,7,12,10,32,1,
       CHANGE=(10,C'?',C'9999-12-31'),
       NOMATCH=(22,10),32,1,108,2)
  OUTFIL INCLUDE=(108,2,CH,EQ,C'GB',AND,12,10,CH,NE,22,10,CH)
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Thu Aug 24, 2006 3:12 am
Reply with quote

Code:
SORT FIELDS=(1,7,PD,A,8,10,CH,A,18,10,CH,A)             
INREC FIELDS=(1:1,7,8:12,10,18:32,1,                     
       CHANGE=(10,C'?',C'9999-12-31'),                   
       NOMATCH=(22,10),28:32,1,29:108,2)                 
INCLUDE COND=(108,2,CH,EQ,C'GB',AND,12,10,CH,NE,22,10,CH)


In the above I need the Include condition to execute first...then the fields to change and then to sort...Is it fine....
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Thu Aug 24, 2006 3:27 am
Reply with quote

Frank Please clear my doubt asap......I've already tested the same thing and it's working fine....But this is a production issue and I need ur confirmation.....
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: Thu Aug 24, 2006 3:36 am
Reply with quote

Yes, your statements will do what you said. Personally, I would rearrange it like this as a visual aid to the order in which the statements are executed (although you don't have to):

Code:

  INCLUDE COND=(108,2,CH,EQ,C'GB',AND,12,10,CH,NE,22,10,CH)
  INREC FIELDS=(1:1,7,8:12,10,18:32,1,                     
       CHANGE=(10,C'?',C'9999-12-31'),                   
       NOMATCH=(22,10),28:32,1,29:108,2) 
  SORT FIELDS=(1,7,PD,A,8,10,CH,A,18,10,CH,A)             
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Thu Aug 24, 2006 3:53 am
Reply with quote

Thanks Frank ....We can always depend upon you....
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 Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
No new posts Change Default Scroll Setting TSO/ISPF 1
Search our Forums:

Back to Top