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

Need help in syntax of outrec statement


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Tue Apr 24, 2007 12:49 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts CNTL= Command Syntax Documentation CA Products 3
Search our Forums:

Back to Top