MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LABEL processing for DISK files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Mon Dec 23, 2002 6:54 pm    Post subject: LABEL processing for DISK files Reply with quote

I have got the following declaration for a file.
Code:

FILE-CONTROL.
    SELECT DTL-TAPE01    ASSIGN  UT-S-INFILE.

FILE SECTION.
FD   DTL-TAPE01
     BLOCK 0 RECORDS
     RECORD CONTAINS 0 CHARACTERS
     RECORDING MODE IS F
     LABEL RECORD IS USER-LABEL. 
01  USER-LABEL                 PIC X(80).
01  FILE-DATA           PIC X(90).

Now, the following statements in the Procedure Division.
Code:

PROCEDURE DIVISION.
DECLARATIVES.
USER-HEADER-LABEL SECTION.
    USE AFTER STANDARD BEGINNING FILE LABEL
        PROCEDURE ON DTL-TAPE01.
SUBMISSION-MOVE.
    MOVE USER-LABEL TO  DATE-DETAIL.
END DECLARATIVES.

Declaration for DATE-DETAIL is:
Code:

 01  DATE-DETAIL.
    03  FILLER                  PIC X(41).
    03  DATE-IN                  PIC X(6).
    03  SUBMISSION-NBR            PIC 9(6).
    03  FINAL-ID              PIC XX.
    03  FILLER                  PIC X(25).

Then in my Procedure Division, I have a statment:
Code:

IF EXXX-SUB-NBR = SUBMISSION-NBR
    NEXT SENTENCE
  ELSE
    PERFORM PRINT-ERROR
    PERFORM CLOSE-RTN
    STOP RUN.

Now the problem I'm facing is..
During processing I will have a six digit number in EXXX-SUB-NBR (Say 123456). To make the program run for this condition, I have to get the SUBMISSION-NBR also the same value. But this portion is coming from the LABEL of the file (I have the input file in DASD). Is there any way to influence the value of LABEL? I mean editing some value or anything like that. Of course, I can edit the value in EXXX-SUB-NBR. But I was thinking whether the other way is possible or not.

I saw the following in manual.

User labels are generally created, examined, or updated when the beginning or end of a data set or volume (reel) is reached. End- or
beginning-of-volume exits are allowed (that is, intermediate trailers and
headers may be created or examined).


But couldn't understand what exactly it mean. I agree we can examine the LABEL when we open a file but how can I update it? (Or I'm reading the above statement wrongly?)

(Some more inputs : I'm opening the file in INPUT mode.
Version is VS COBOL II)

Thanks for your help,
Hari.
Back to top
View user's profile Send private message Send e-mail
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Tue Dec 24, 2002 2:01 pm    Post subject: Reply with quote

Till now, no replies? Crying or Very sad

Actually, this issue was faced by one of my friend. I asked him to edit EXXX- variable...

------
Hari.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Tue Dec 24, 2002 4:34 pm    Post subject: Reply with quote

Hari,

Well take a look at User Label Groups.

The above link shows the description of userlabels. so Now try to create the input dataset by coding the LABEL parameter with the required number.Make sure that you code SUL(standard user label) on the label parameter while creating the dataset

Hope this helps...

cheers

kolusu

PS: VS COBOL II is longer supported by IBM.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Thu Dec 26, 2002 8:13 pm    Post subject: Reply with quote

Thanks Kolusu,

I have passed the information to my friend. Will let you know the result once he tries it.
-----
Hari.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group