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
 

 

Plz help in outrec in dfsort !!! I got return code 16

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

New User


Joined: 06 Jul 2009
Posts: 13
Location: chennai

PostPosted: Thu Dec 17, 2009 8:19 pm    Post subject: Plz help in outrec in dfsort !!! I got return code 16
Reply with quote

Hi all,

My requirement is to increase two fields in output field

Code:
ie

Record Type
 
From     To  Length   Field
1          4      4         Record type
5          8      4         Department cod
9         12      4         Commodiyt /* Which should be increased to length  25 ie adding another 21 blank/*
13        72     60         Product description /*
                            Which should be increased to length 100 ie adding another 40 blank */



I have written an outrec with below syntax

Code:
SORT FIELDS=COPY                             
OUTREC FIELDS=(1:1,12,13:21X,34:13,72,94:40X)


While executing this i got Return Code : 16 with below error message



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 - 14:17 ON THU DEC
            SORT FIELDS=COPY                                                   
            OUTREC FIELDS=(1:1,12,13:21X,34:13,72,94:40X,134:73,80)             
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE126A 0 INCONSISTENT *OUTREC  IFTHEN 0 REFORMATTING FIELD FOUND               
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E9-K06751 E7-K90000           
ICE052I 3 END OF DFSORT                                                         



Thanks,
Muthu.

Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 17, 2009 8:42 pm    Post subject:
Reply with quote

You will need to adapt the positions to suit your needs, but this works OK for me to reformat records.
This basically puts 21 spaces after the first 14 bytes, then the 4 bytes from column 15 and then pads the record to 120 bytes with spaces.
The SORTIN DD * input is 80 bytes and the SORTOUT output is 120 bytes.
Code:
//SORTIN   DD *                                       
0001-0404-123499999       
0001-0404-123499999                                   
0001-0404-123499999                                   
0001-0404-123499999                                   
0001-0404-123499999                                   
/*                                                     
//SORTOUT  DD DSN=My.dataset.name,DISP=(,CATLG,DELETE),
//            SPACE=(TRK,(1,1),RLSE),RECFM=FB,LRECL=120
//SYSIN    DD *                                       
  OPTION COPY                                         
  OUTFIL OUTREC=(1,14,21X,15,4,120:X)

Which give s the output
Code:
0001-0404-1234                     9999           
0001-0404-1234                     9999           
0001-0404-1234                     9999           
0001-0404-1234                     9999           
0001-0404-1234                     9999           
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 Dec 17, 2009 11:22 pm    Post subject:
Reply with quote

Code:

   OUTREC FIELDS=(1:1,12,13:21X,34:13,72,94:40X)


The reason you got an error for this is that the 34:13,72 and 94:40X fields overlap (34:13,72 ends after 94). It's not clear what you really want to do, but it would be something like this:

Code:

   OUTREC FIELDS=(1,12,34:13,72,40X)
Back to top
View user's profile Send private message
kumarmca1

New User


Joined: 06 Jul 2009
Posts: 13
Location: chennai

PostPosted: Fri Dec 18, 2009 10:45 am    Post subject:
Reply with quote

Hi Frank,

Thanks for the help. You are right.. I mistakenly given the input file field position rather than lenght. So i got the error.

The input file length is 80 and my output file lenght is 160

Code:
OUTREC FIELDS=(1:1,12,13:21X,34:13,60,94:40X,134:73,8)


I have used the above code and got the expected result.

Hi Expat,

Thanks for your quick reply. I got the point from your mail.

Thanks,
Muthu
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: Fri Dec 18, 2009 9:11 pm    Post subject:
Reply with quote

You don't need the nX fields since you have c: - I would write the OUTREC statement like this:

Code:

   OUTREC BUILD=(1:1,12,34:13,60,134:73,8)
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am


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