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
 

 

SD Clause Syntex

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Dec 17, 2007 3:17 pm    Post subject: SD Clause Syntex
Reply with quote

hi
i want to create an output file while sorting the records so under DATA DIVISION in File Section i am giving SD clause.
Can any one suggest me the syntex for that
i am giving it as

SD DIALONE-FILE
RECORD CONTAINS 760 CHARACTERS
DATA RECORD IS DIALONE-REC PIC X(760).

please tell me whatall changes i need to do there.
Back to top
View user's profile Send private message

guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Dec 17, 2007 3:30 pm    Post subject: hi
Reply with quote

hi murali
can u tell me what all changes are required in the above syntex.
the error message i am getting is
""DIALONE-FILE" was defined as a type that was invalid in this context." and
"Expected a record-name, but found "DIALONE-REC". The statement was discarded."
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: Mon Dec 17, 2007 3:48 pm    Post subject: Re: SD Clause Syntex
Reply with quote

For starers....
Code:
SD  DIALONE-FILE                                                 
    RECORD CONTAINS 760 CHARACTERS                               
    DATA RECORD IS  DIALONE-REC
01 DIALONE-REC                       PIC X(760).

I really do not think that you are going to get what you want this way.....
Read the language reference: Data Division--file description entries
and the programming guide: Sorting and merging files
Back to top
View user's profile Send private message
guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Dec 17, 2007 3:58 pm    Post subject:
Reply with quote

i have used the above code but still getting the same error.
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: Mon Dec 17, 2007 4:01 pm    Post subject:
Reply with quote

Not enough information, try again.....
Back to top
View user's profile Send private message
guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Dec 17, 2007 5:02 pm    Post subject:
Reply with quote

is there any specific condition needs to be handle while opening or closing such files..
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: Mon Dec 17, 2007 5:13 pm    Post subject: Re: SD Clause Syntex
Reply with quote

guptaa wrote:
i have used the above code but still getting the same error.
I don't think so, what error with what syntax?
Quote:
is there any specific condition needs to be handle while opening or closing such files..
You don't open or close SD files, the sort does.
Please:
CICS Guy wrote:
Read the language reference: Data Division--file description entries
and the programming guide: Sorting and merging files
and
Quote:
Not enough information, try again.....
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Mon Dec 17, 2007 5:26 pm    Post subject:
Reply with quote

Ashish Gupta,

Could you please give the Error code?
Back to top
View user's profile Send private message
guptaa

New User


Joined: 22 Feb 2007
Posts: 10
Location: pune

PostPosted: Mon Dec 17, 2007 6:14 pm    Post subject:
Reply with quote

while compiling i am getting return code 12 and message is
"3560 IGYPS2143-S Expected a record-name, but found "DIALONE-REC".
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: Mon Dec 17, 2007 6:17 pm    Post subject:
Reply with quote

Hopeless..... icon_rolleyes.gif
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Mon Dec 17, 2007 6:31 pm    Post subject:
Reply with quote

Gupta,

The same syntax is working fine in my Env..,
I am using IBM ENTERPRISE COBOL FOR Z/OS 3.4.1
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Dec 17, 2007 9:46 pm    Post subject:
Reply with quote

Hello guptaa,

If you want help from the forum, you have to do a more complete job explaining/posting what is not working as you want.

If you post the SELECTs, the FDs/SDs, and the OPEN/CLOSE and SORT statements, we may be better able to give you assistance rather than continuing to "toss the ball" back and forth,
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm
No new posts [SQL0029] INTO clause missing from em... HABBIE DB2 2 Fri Sep 04, 2015 3:54 pm
No new posts 3-D Table with nested DEPENDING ON Cl... VivekKhanna COBOL Programming 5 Sat Aug 08, 2015 11:18 pm
No new posts when=group clause: question about the... tuxama DFSORT/ICETOOL 2 Thu Mar 26, 2015 12:51 pm
No new posts pic clause on group variable error CuriousMainframer COBOL Programming 6 Mon Jul 14, 2014 6:33 pm


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