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
 
Change parameter in OUTREC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Change parameter in OUTREC
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 Moderator


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

PostPosted: Wed Jul 26, 2006 1:47 am    Post subject:
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    Post subject: Re: Change parameter in OUTREC
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    Post subject: Re: Change parameter in OUTREC
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 Moderator


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

PostPosted: Wed Jul 26, 2006 2:24 am    Post subject:
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    Post subject: Re: Change parameter in OUTREC
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    Post subject:
Reply with quote

First sort will be executed
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Aug 23, 2006 8:23 pm    Post subject:
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:

http://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    Post subject: Re: Change parameter in OUTREC
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 Moderator


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

PostPosted: Thu Aug 24, 2006 2:35 am    Post subject:
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    Post subject: Re: Change parameter in OUTREC
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    Post subject: Re: Change parameter in OUTREC
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 Moderator


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

PostPosted: Thu Aug 24, 2006 3:36 am    Post subject:
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    Post subject: Re: Change parameter in OUTREC
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

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