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
 

 

Need help in syntax of outrec statement

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

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Tue Apr 24, 2007 12:37 am    Post subject: Need help in syntax of outrec statement
Reply with quote

Hi,
I have 2 requests:
1) Below is my outrec statement.
I am getting syntax error at the second 'PD' . i am not able to figure what went wrong. can anyone help

Code:
OUTREC FIELDS=(1:1,2,C'22',                 
               3,130,8,                     
               11,191,4,                     
               15,195,30,                   
               45,362,9,PD,TO=ZD,LENGTH=14, 
               63,377,9,PD,TO=ZD,LENGTH=14, 
               81,263,3,                     
               85,61,26,                     
               111,365,5)                   



I tried giving 'M4' instead of TO=ZD, still getting syntax error.

2) I need to append spaces to my output file. i.e starting from 116 posistion for 185 length i need spaces
I gave in the above outrec statment the last line as
Code:
116,185x
- gave error

Code:
185X
- gave error

can someone help.
Thanks,
Viji
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 Apr 24, 2007 12:49 am    Post subject:
Reply with quote

You seem to be coding n, instead of n: in many cases. For example, instead of:

45,362,9,PD,TO=ZD,LENGTH=14,

you most likely want:

45:362,9,PD,TO=ZD,LENGTH=14,

45:362,9,PD,... is valid because it has an output column (45:) followed by p,m,f (362,9,PD). 46,362,9,PD is invalid.

116:185X) will also work.

I'd show you how to fix it all up but I can't really tell what you want. You have:

Code:

   OUTREC FIELDS=(1:1,2,C'22',                 
               3,130,8,


That would put C'22' in output positions 3 and 4, so you couldn't use 3:130,8, since the next item must start at position 5 or greater. You could use 5:130,8, but you'll need to fix the subsequent output positions as well.
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Tue Apr 24, 2007 1:11 am    Post subject: Re: Need help in syntax of outrec statement
Reply with quote

Thanks Frank.
It the comma instead of the colon which caused me trouble
I corrected as suggested by you and it worked fine.

Code:
OUTREC FIELDS=(1:C'22',                 
               3:130,8,                 
               11:191,4,                 
               15:195,30,               
               45:362,9,PD,M4,LENGTH=18,
               63:377,9,PD,M4,LENGTH=18,
               81:263,3,                 
               85:61,26,                 
               111:365,5,               
               116:185X)         


Thanks for your help.
Viji
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 -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am


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