View previous topic :: View next topic
|
Author |
Message |
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Hi,
I have a PS dataset with below specification,
Record format: FB
Record length: 5609
Block size: 16827
It has around 50 PD fields (probably more than that) at different positions.
I want to convert all those PD fields to ZD.
One way to do this is, providing all PD field's positions in the OUTREC FIELDS. But it is very tough to mention all the PS fields positions.
Is there any other way?? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
as far as I know, NO. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For a record that size, i imagine there is a COBOL copybook.
If this were my task, i'd clone the copybook with the packed fields to another with the same field names, but with zoned pic's rather than packed.
Then i'd code a simple read, move corresponding, write bit of code and be done with it.
Using field names is a lot smoother than keeping track of displacement/length in bytes for the whole record. |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Hi Dick,
Can we move Group Item which contains Elemenrary level Packed fields to another Group Item??
It is giving SOC4 Abend, if I use MOVE CORRESPONDING. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
A group move will not do what you want.
The 0C4 says you are referencing storage you don't own, can you post a small example of how you are defining the source and destination for the move corresponding? |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Hi,
For example...
My Source Copybook contains below fields,
01 INPUT-REC.
02 VAR1.
05 VAR3 PIC XX.
05 VAR4 PIC XX.
05 VAR5 PIC XX.
02 VAR 6.
05 VAR7 PIC S9(7)V99 COMP-3.
05 VAR8 PIC X.
05 VAR9 PIC S9(7) COMP-3.
Destination Copybook contains below fields,
01 OUTPUT-REC.
02 VAR1.
05 VAR3 PIC XX.
05 VAR4 PIC XX.
05 VAR5 PIC XX.
02 VAR 6.
05 VAR7 PIC S9(7)V99.
05 VAR8 PIC X.
05 VAR9 PIC S9(7).
In Procudere Division,
MOVE CORR INPUT-REC TO OUTPUT-REC. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Looks reasonable, where are "INPUT-REC" and "OUTPUT-REC" defined, FD or WS?
Is there any additional information with the S0C4? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Does this program only have the 2 file definitions, reads/writes, and the move corr?
I would not expect that to cause an 0c4.
Are you by chance using an internal sort in the program? |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Yes Dick,
My program have only 2 file definitions (one for Input file and other for Output file), Read the Input file, Move Corr to Output file rec and write Output file. This is all my program does.
It doesnot contain any internal SORT.
William,
INPUT-REC & OUTPUT-REC are defined in FD.
This is message displayed in SYSOUT.
"CEE3204S The system detected a protection exception (System Completion Code=0C4). |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Splurge a little, post the COBOL code...... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Posting the code would be helpful.
This is a stand-alone batch job run thru jcl?
Does it abend right away or after some amount of data has been processed (if you specify (,catlg,catlg) for the output file, you can see how far it processed before abending). |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
HI,
My Prgram is ,
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. PRGPD2ZD.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT EPAY-IN ASSIGN TO EPAYIN.
SELECT EPAY-OUT ASSIGN TO EPAYOUT.
DATA DIVISION.
FILE SECTION.
FD EPAY-IN
RECORDING MODE IS F
LABEL RECORDS ARE STANDARD.
COPY CFEUNETB.
FD EPAY-OUT
RECORDING MODE IS V
LABEL RECORDS ARE STANDARD.
COPY SRISCOPY.
WORKING-STORAGE SECTION.
77 EOF PIC X VALUE 'N'.
PROCEDURE DIVISION.
1000-MAIN-PARA.
OPEN INPUT EPAY-IN
OUTPUT EPAY-OUT.
PERFORM 2000-READ-PARA
UNTIL EOF = 'Y'.
IF EOF NOT = 'Y'
PERFORM 2100-WRITE-PARA
END-IF
CLOSE EPAY-IN
EPAY-OUT.
STOP RUN.
2000-READ-PARA.
READ EPAY-IN
AT END MOVE 'Y' TO EOF.
2100-WRITE-PARA.
MOVE CORR TOPS-EXTRACT-EMPLOYEE-INFO
TO EPAY-OUT-REC.
WRITE EPAY-OUT-REC. |
Copybook 'CFEUNETB' is of lenth 5609 bytes, contains some Comp-3 fields. Copybook 'SRISCOPY' is just a copy of 'CFEUNETB', where all Comp-3 fields are defined as Normal ZD fields.
My JCL is:
//TSUA6UIS JOB ('META0102'),CLASS=A,MSGCLASS=A,NOTIFY=&SYSUID
//*
//JOBLIB DD DSN=TSUA6UI.LOAD,DISP=SHR
//STEP1 EXEC PGM=PRGPD2ZD
//SYSOUT DD SYSOUT=*
//EPAYIN DD DSN=TSUA6UI.EMPCORE.DATA,DISP=SHR
//EPAYOUT DD DSN=TSUA6UI.EMPCORE.DATA1,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,3),RLSE)
/*
It got abended right away, I mean no data has been processed. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Code works better than color.
Why did the recfm change from fixed to variable?
Stick a display in after the open and before the perform to see if you survived the open.
Your program logic is slightly lacking, try it this way:
Code: |
display 'every thing opened OK'
PERFORM UNTIL EOF = 'Y'
perform 2000-READ-PARA
IF EOF NOT = 'Y'
PERFORM 2100-WRITE-PARA
END-IF
end-perform. |
|
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Thanks a lot William for correcting me.
I have put a DISPLAY Statement after OPENing the files.
However, the DISPLAY Statement is not execueted. There is no message from program in SYSOUT.
Still am getting the same '0C4' abend. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Why did the recfm change from fixed input to variable output? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As an experiment, please add another DISPLAY 'ENTERING PROCEDURE DIVISION' as the first statement in the procedure division. Follow that DISPLAY with a few DISPLAY ' ' statements. If this display is not in sysout, you may have a problem with how the module was link edited.
You might look at the output of the compile for any warnings - things that are not an error may still cause run-time problems.
After your job executes, look at each of the jes outputs and see if there is any diagnostic information. |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Hi,
I have done slight modifications to my code in Procudure division.
Code: |
PROCEDURE DIVISION.
DISPLAY "ENTERED INTO PROC DIV".
1000-MAIN-PARA.
DISPLAY "ENTERED INTO 1000 PARA"
OPEN INPUT EPAY-IN
OUTPUT EPAY-OUT
DISPLAY "FILES ARE OPENED FINE"
PERFORM 2000-PARA
UNTIL EOF = 'Y'
CLOSE EPAY-IN
EPAY-OUT
STOP RUN.
2000-PARA.
READ EPAY-IN
AT END MOVE 'Y' TO EOF
IF EOF NOT = 'Y'
MOVE CORR EPAY-IN-REC
TO EPAY-OUT-REC
WRITE EPAY-OUT-REC
END-IF. |
Am getting ENTERED INTO 1000 PARA in SYSOUT, but not FILES ARE OPENED FINE.
Is there any error in Opening the files?? I cant see file opening errors in my SPOOL.
Willaim,
Now the recfm is fixed for both Files.
There are some warning messages in Compile listing, Can these be ignored??
Code: |
IGYDS1073-I "CS-EE-PROVIDER-INFO" redefined a larger item.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-PROVIDER-INFO" within "EPAY-IN-REC" did not qualify
according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-PROVIDER-INFO" was ignored.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-EOB-COPY-INFO" within "EPAY-IN-REC" did not qualify
according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-EOB-COPY-INFO" was ignored.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "FILLER" within "EPAY-IN-REC" did not qualify according to
the rules for the "CORRESPONDING" phrase. Subordinate item "FILLER" was ignored.
Same message on line: 1158 1158 1158 1158 1158 1158 1158 1158 1158 1158 1158
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-SUBL-TABLE" within "EPAY-IN-REC" did not qualify
according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-SUBL-TABLE" was ignored.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-LINE-DATA-INFO" within "EPAY-IN-REC" did not
qualify according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-LINE-DATA-INFO" was
ignored.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-PROV-DATA-AREA-2" within "EPAY-IN-REC" did not
qualify according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-PROV-DATA-AREA-2" was
ignored.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-MODIFIER-DATA" within "EPAY-IN-REC" did not qualify
according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-MODIFIER-DATA" was ignored.
IGYPS2168-W "CORRESPONDING" was specified, but subordinate item "CS-EE-UB92-DATA" within "EPAY-IN-REC" did not qualify
according to the rules for the "CORRESPONDING" phrase. Subordinate item "CS-EE-UB92-DATA" was ignored.
IGYOP3091-W Code from "MOVE (line 1158.01)" to "WRITE (line 1160.01)" can never be executed and was therefore discarded. |
|
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Quote: |
Is there any error in Opening the files?? I cant see file opening errors in my SPOOL. |
You have not used file status in the program. Please put that and see whether files are being opened correctly or not.
Quote: |
There are some warning messages in Compile listing, Can these be ignored?? |
Gnerally yes. Could you post the working storage declartions alos for better picture of the compilation errors? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You are missing periods at multiple places in the code - this should not cause an 0c4, but should be corrected.
What messages are in the output from the link edit? The link edit does specify the correct module name(s)?
If the 0c4 is raised on the open, i doubt that the file-status check/display will be executed.
Please split the open into 2 separate statements and issue a DISPLAY after each. |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Hello,
0C4 problem has been solved. It was the problem while Link editing.
However,
Code: |
MOVE CORR EPAY-IN-REC
TO EPAY-OUT-REC |
is not working. It is generating 0C7 now.
Just tried movind with out CORR. All the records have been copied to output file, but Packed Fields in the input file are generated unintended values in the output file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you are getting an s0c7, most likely either the data is invalid or the input record layout is invalid. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Jonnala,
Before writing to output, initialize the output record. Try to use below code, it should work.
Code: |
2100-WRITE-PARA.
INITIALIZE EPAY-OUT-REC.
MOVE CORR TOPS-EXTRACT-EMPLOYEE-INFO
TO EPAY-OUT-REC.
WRITE EPAY-OUT-REC. |
Please let me know the results. |
|
Back to top |
|
|
Jonnala
New User
Joined: 22 Sep 2006 Posts: 12
|
|
|
|
Hi Anuj, No change in the result. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Initializing the receiving area for a move will not correct an 0c7 when there is bad input data to the move.
Please check the contents of each field against the "sending" data layout. |
|
Back to top |
|
|
|