View previous topic :: View next topic |
Author |
Message |
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Mon Dec 23, 2002 6:54 pm Post subject: LABEL processing for DISK files |
|
|
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 |
|
|
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Tue Dec 24, 2002 2:01 pm Post subject: |
|
|
Till now, no replies?
Actually, this issue was faced by one of my friend. I asked him to edit EXXX- variable...
------
Hari. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Dec 24, 2002 4:34 pm Post subject: |
|
|
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 |
|
|
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Thu Dec 26, 2002 8:13 pm Post subject: |
|
|
Thanks Kolusu,
I have passed the information to my friend. Will let you know the result once he tries it.
-----
Hari. |
|
Back to top |
|
|
|
|