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
 

 

Just a question about conditions and outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
gabriel.ryoga

New User


Joined: 07 Jun 2007
Posts: 31
Location: Spain

PostPosted: Tue May 27, 2008 5:59 pm    Post subject: Just a question about conditions and outrec
Reply with quote

I've this sysin:
Code:

SORT FIELDS=COPY                   
   OUTFIL FNAMES=FILE1,           
    INCLUDE=(84,15,ZD,GE,208,15,ZD)
    OUTREC FIELDS=(C'T',1,239)     
   OUTFIL FNAMES=FILE2,         
    INCLUDE=(84,15,ZD,LT,208,15,ZD)
    OUTREC FIELDS=(C'T',1,239)


I was trying to create two files, one with the regs with number in position 84, greater or equal than the number in position 208.
And other file with number in pos 84 less than number in pos 208.

That didn't worked, and everytime I was getting all regs in file 2....

So I changed to this one:
Code:

 SORT FIELDS=COPY                   
 INREC FIELDS(C'T',1,239)           
    OUTFIL FNAMES=FILE1,           
     INCLUDE=(85,15,ZD,GE,209,15,ZD)
    OUTFIL FNAMES=FILE2,         
     INCLUDE=(85,15,ZD,LT,209,15,ZD)


This Sysin worked fine for my needs, but I still don't understand why the first one didn't worked....

can somebody explain it??
Back to top
View user's profile Send private message

Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue May 27, 2008 6:06 pm    Post subject:
Reply with quote

Can you post samples of the data in the input file please?
Back to top
View user's profile Send private message
gabriel.ryoga

New User


Joined: 07 Jun 2007
Posts: 31
Location: Spain

PostPosted: Tue May 27, 2008 6:23 pm    Post subject:
Reply with quote

INPUT1:
Code:

00000000000001C00000000000002C
00000000000003C00000000000001C


FILE1:
Code:

T00000000000003C00000000000001C


FILE2:
Code:

T00000000000001C00000000000002C


SYSIN1:
Code:

SORT FIELDS=COPY                   
   OUTFIL FNAMES=FILE1,           
    INCLUDE=(1,15,ZD,GE,16,15,ZD)
    OUTREC FIELDS=(C'T',1,30)     
   OUTFIL FNAMES=FILE2,         
    INCLUDE=(1,15,ZD,LT,16,15,ZD)
    OUTREC FIELDS=(C'T',1,30)


SYSIN2:
Code:

 SORT FIELDS=COPY                   
 INREC FIELDS(C'T',1,30)           
    OUTFIL FNAMES=FILE1,           
     INCLUDE=(1,15,ZD,GE,16,15,ZD)
    OUTFIL FNAMES=FILE2,         
     INCLUDE=(1,15,ZD,LT,16,15,ZD)



I would like to know why is working SYSIN2 and not SYSIN1.

Thanks.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue May 27, 2008 6:43 pm    Post subject:
Reply with quote

gabriel.ryoga wrote:
I would like to know why is working SYSIN2 and not SYSIN1.
Are you syre that you don't have SYSIN1 and SYSIN2 reversed?

What I see is
SYSIN1:
Code:
00000000000001C GE 00000000000002C FALSE
00000000000003C GE 00000000000001C TRUE
123456789012345    123456789012345

SYSIN2:
Code:
T00000000000001 GE C00000000000002 TRUE
T00000000000003 GE C00000000000001 TRUE
123456789012345    123456789012345
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue May 27, 2008 6:46 pm    Post subject:
Reply with quote

I was misled by the 208,15 and 209,15 in your first post and was thinking on the lines why the first one (208,15) didn't work and the second one (209,15) worked.

Only now i realised that you were referring to the OUTREC FIELDS. It didn't work in mine too and the error message was duplicate outrec statements. This may have something to do with the version of DFSORT but i will let the experts to comment on that.
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: Tue May 27, 2008 9:06 pm    Post subject:
Reply with quote

Gabriel,

Code:

  SORT FIELDS=COPY
  OUTFIL FNAMES=FILE1,                 <--- first OUTFIL statement
    INCLUDE=(84,15,ZD,GE,208,15,ZD)    <--- first OUTFIL statement
  OUTREC FIELDS=(C'T',1,239)           <--- first OUTREC statement
  OUTFIL FNAMES=FILE2,                 <--- second OUTFIL statement
    INCLUDE=(84,15,ZD,LT,208,15,ZD)    <--- second OUTFIL statement
  OUTREC FIELDS=(C'T',1,239)           <--- dup OUTREC statement


The problem with the statements above is that you are using the wrong syntax for what you want to do. You are mixing up the OUTREC statement with the OUTREC operand of the OUTFIL statement. This is the reason we recommend that you use the BUILD operand rather than the OUTREC operand. The correct syntax for what you want to do would be:

Code:

  SORT FIELDS=COPY
  OUTFIL FNAMES=FILE1,                 <--- first OUTFIL statement
    INCLUDE=(84,15,ZD,GE,208,15,ZD),   <--- first OUTFIL statement
    BUILD=(C'T',1,239)                 <--- first OUTFIL statement
  OUTFIL FNAMES=FILE2,                 <--- second OUTFIL statement
    INCLUDE=(84,15,ZD,LT,208,15,ZD),   <--- second OUTFIL statement
    BUILD=(C'T',1,239)                 <--- second OUTFIL statement


Your control statements with INREC worked because they have the correct syntax:

Code:

  SORT FIELDS=COPY
  INREC FIELDS(C'T',1,239)             <--- INREC statement
  OUTFIL FNAMES=FILE1,                 <--- first OUTFIL statement
    INCLUDE=(85,15,ZD,GE,209,15,ZD)    <--- first OUTFIL statement
  OUTFIL FNAMES=FILE2,                 <--- second OUTFIL statement
    INCLUDE=(85,15,ZD,LT,209,15,ZD)    <--- second OUTFIL statement
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 QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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