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

Will VS COBOL allow >=


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sasi Kiran Patha
Warnings : 2

New User


Joined: 19 Nov 2006
Posts: 73
Location: Hyederabad

PostPosted: Mon Feb 05, 2007 1:08 pm
Reply with quote

Suppose we populate part of Record Key and use a START, Can we expect a file status '00' under any circumstance.

VS COBOL does not allow >=. Please suggest

Regards,
Sasi Patha.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 05, 2007 2:06 pm
Reply with quote

Yes, an FS 00 is possible.
Wrong, greater or equal is allowed.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 05, 2007 2:14 pm
Reply with quote

Sasi Kiran Patha wrote:
VS COBOL doesnot allow >= with START, for a VSAM file.
On Populating part of record key and use just = gives file status '23',
record not found. Please suggest.
Wrong, greater or equal is allowed.
There is no record available that matches the key given.
Back to top
View user's profile Send private message
Sasi Kiran Patha
Warnings : 2

New User


Joined: 19 Nov 2006
Posts: 73
Location: Hyederabad

PostPosted: Mon Feb 05, 2007 2:17 pm
Reply with quote

Please let me know the syntax for >= in START command.

Regards,
Sasi Patha.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 05, 2007 2:27 pm
Reply with quote

Sasi Kiran Patha wrote:
Please let me know the syntax for >= in START command.
Did you look here: 3.33 START Statement ?
Back to top
View user's profile Send private message
Sasi Kiran Patha
Warnings : 2

New User


Joined: 19 Nov 2006
Posts: 73
Location: Hyederabad

PostPosted: Mon Feb 05, 2007 2:41 pm
Reply with quote

Sorry, for some reasons "GREATER THAN OR EQUAL TO" did not compile.

The compiler reported error : "Expected new statement found OR , skipped to next verb or sentence."

im not sure of the reason.

Regards,
Sasi Patha.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 05, 2007 2:58 pm
Reply with quote

Sounds like some sort of syntax error, cut and paste your start statement (and the select and FD).
Back to top
View user's profile Send private message
Sasi Kiran Patha
Warnings : 2

New User


Joined: 19 Nov 2006
Posts: 73
Location: Hyederabad

PostPosted: Mon Feb 05, 2007 3:10 pm
Reply with quote

SELECT AP-ZB-EXTRACT-FILE ASSIGN TO VSAMG-APZBIN
ACCESS MODE IS DYNAMIC
ORGANIZATION IS INDEXED
RECORD KEY IS AP-ZB-KEY
ALTERNATE RECORD KEY IS AP-ZB-CUST-ID OF AP-ZB-KEY
WITH DUPLICATES
ALTERNATE RECORD KEY IS AP-ZB-NM1-SS OF AP-ZB-KEY
WITH DUPLICATES
ALTERNATE RECORD KEY IS AP-ZB-NM2-SS OF AP-ZB-EXTRACT-REC
WITH DUPLICATES
FILE STATUS IS AP-ZB-FILE-STATUS.

FD AP-ZB-EXTRACT-FILE
LABEL RECORDS ARE STANDARD
DATA RECORD IS AP-ZB-EXTRACT-REC.

01 AP-ZB-EXTRACT-REC.
05 AP-ZB-KEY.
10 AP-ZB-CUST-ID PIC X(10).
10 AP-ZB-NM1-SS PIC X(09).
10 AP-ZB-COMP-CODE PIC X(03).
10 AP-ZB-OFF-NUM PIC X(06).
10 AP-ZB-CONTRACT-NUM.
15 AP-ZB-ACCT-NUM PIC X(06).
15 AP-ZB-CYCLE-DT PIC X(02).
05 FILLER PIC X(35).
05 AP-ZB-NM2-SS PIC X(09).


START AP-ZB-EXTRACT-FILE
KEY GREATER THAN OR EQUAL TO AP-ZB-KEY.

Compile Error :
IKF4003I-E EXPECTING NEW STATEMENT. FOUND OR . DELETING TILL NEXT VERB OR PROCEDURE-NAME.

Regards,
Sasi Patha.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Feb 05, 2007 3:27 pm
Reply with quote

Kinda sounds like an even older version of VS COBOL than I have a manual for....
I'd think that with a partial key less than where you want to start and a start key greater clause, you should get you just where want to be.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Feb 06, 2007 7:11 am
Reply with quote

What version of COBOL are you compiling with?
Back to top
View user's profile Send private message
Sasi Kiran Patha
Warnings : 2

New User


Joined: 19 Nov 2006
Posts: 73
Location: Hyederabad

PostPosted: Tue Feb 06, 2007 9:26 am
Reply with quote

Hi,

please Let me know how do we know the version of COBOL we are working on.
I looked in F-->3-->1--> option A for the program and mentioned the Load Library, just "VS COBOL" is displayed.

Regards,
Sasi Patha.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Feb 06, 2007 9:54 am
Reply with quote

Hello,

Look near the top of the first page of your compilation listing. You should see something that looks like
Quote:
PP 5655-G53 IBM ENTERPRISE COBOL FOR Z/OS 3.4.1


When you find the info, please post it in this thread.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1049
Location: Richmond, Virginia

PostPosted: Tue Feb 06, 2007 6:21 pm
Reply with quote

Does NOT < work?
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Replacing FILLER with FILLER<SeqNu... DFSORT/ICETOOL 2
No new posts Compile Sp Cobol base COBOL Programming 1
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
Search our Forums:

Back to Top