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
 

 

Converting all PD Fields in a dataset to ZD.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Thu May 17, 2007 6:06 pm    Post subject: Converting all PD Fields in a dataset to ZD.
Reply with quote

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
View user's profile Send private message

acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu May 17, 2007 6:15 pm    Post subject:
Reply with quote

as far as I know, NO.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu May 17, 2007 8:06 pm    Post subject:
Reply with quote

You could create a layout of the record using DFSORT Symbols and then give the symbol names rather than the positions. For complete information on using DFSORT Symbols, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/7.0?DT=20060615185603

If you have a COBOL Copy book for the record layout, you can create the DFSORT Symbols automatically. For details, see the "Create DFSORT Symbols from COBOL COPYs" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
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: Fri May 18, 2007 2:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Tue May 22, 2007 3:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue May 22, 2007 3:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Tue May 22, 2007 4:20 pm    Post subject: Re: Converting all PD Fields in a dataset to ZD.
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue May 22, 2007 5:26 pm    Post subject:
Reply with quote

Looks reasonable, where are "INPUT-REC" and "OUTPUT-REC" defined, FD or WS?
Is there any additional information with the S0C4?
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: Tue May 22, 2007 7:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Tue May 22, 2007 7:25 pm    Post subject: Re: Converting all PD Fields in a dataset to ZD.
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue May 22, 2007 9:00 pm    Post subject:
Reply with quote

Splurge a little, post the COBOL code......
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: Wed May 23, 2007 12:40 am    Post subject:
Reply with quote

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
View user's profile Send private message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Fri May 25, 2007 12:14 pm    Post subject: Re: Converting all PD Fields in a dataset to ZD.
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri May 25, 2007 3:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Fri May 25, 2007 7:54 pm    Post subject: Re: Converting all PD Fields in a dataset to ZD.
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri May 25, 2007 8:14 pm    Post subject:
Reply with quote

Why did the recfm change from fixed input to variable output?
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: Fri May 25, 2007 9:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Jonnala

New User


Joined: 22 Sep 2006
Posts: 12

PostPosted: Mon May 28, 2007 12:09 pm    Post subject: Re: Converting all PD Fields in a dataset to ZD.
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon May 28, 2007 12:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon May 28, 2007 4:20 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


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