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

SYNCSORT- extracting the info from the copy book?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Fri Oct 31, 2008 1:18 pm
Reply with quote

Hi All,

I have a requirement, in which i have to extract all the details from the copybook i.e Variable name, length of the variable, If , and write to other file as below:

Output:
Code:
 
Field name                       Field Length   
AGENT_NAME                        X(25)         
AGENT_PHONE                       X(10)   


My input file is of type FB, length =80. Position of PIC clause starts at 55 position and my copy books has 05 and 10, 88 level variables.

Is that possible to extract all the copybooks info in the PDS? Help me out in this case.

Thanks,
Guru.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Fri Oct 31, 2008 11:58 pm
Reply with quote

Guru Prasath,
Do you have fixed positions for the level,start position of variable as well ?

If they are fixed,then it is easy to extract them.

Thanks
Krishy
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Nov 01, 2008 12:44 am
Reply with quote

Hi,

It should be doable with a litlle paly around the SORT key words but you need to show a better exapmle of input & corresponding output.

By the way, I was never in a need for such an information however if you have FileAid available at your site you can do it very easily. Output would look like:
Code:
File-AID ---------------------- VIEW LAYOUT ---------------------- Row 1 of 13
COMMAND ===> _______________________________________________  SCROLL ===> CSR
Layout: XXXXXX.XXX1.COPYLIB(TSERPRDC)                                         
                                                 FIELD                       
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH
ESP-RESP-CORR-DEPT-TBL                                      1     550     550
3 ESP-RESP-CORR-DEPT-TBL              GROUP          1      1     550     550
  5 TSERPRD-ARGUMENT-DATA             GROUP          2      1      50      50
    10 SE-PAY-CTR-CD                  XX             3      1       2       2
    10 SE-CPTR-CTR-CD                 XX             4      3       4       2
    10 SE-FINAN-ITEM-CD               X              5      5       5       1
    10 SE-LOAD-NO                     XXX            6      6       8       3
    10 SE-PAY-DCLN-RSN-CD             XX             7      9      10       2
    10 FILLER                         X(40)          8     11      50      40
  5 TSERPRD-RESULT-DATA               GROUP          9     51     550     500
    10 SE-PAY-DCLN-RESP-DEPT-CD                                               
                                      XX            10     51      52       2
    10 FILLER                         X(498)        11     53     550     498
******************************* Bottom of data *******************************

when the input is:
Code:
 03  ESP-RESP-CORR-DEPT-TBL.                                   
*TSERPRD                                                       
     05 TSERPRD-ARGUMENT-DATA.                                 
*                                                   DATAREJA   
      10 SE-PAY-CTR-CD        PIC X(02).                       
*                                                   CDPYCE     
      10 SE-CPTR-CTR-CD       PIC X(02).                       
*                                                   CDSECPTR   
      10 SE-FINAN-ITEM-CD     PIC X(01).                       
*                                                   CDFXZE     
      10 SE-LOAD-NO           PIC X(03).                       
*                                                   NOSLDE     
      10 SE-PAY-DCLN-RSN-CD   PIC X(02).                       
*                                                   DATAREJR   
      10 FILLER               PIC X(40).                       
     05 TSERPRD-RESULT-DATA.                                   
*                                                   CDPAYDCL   
      10 SE-PAY-DCLN-RESP-DEPT-CD                             
                              PIC X(02).                       
*                                                   CDESPDPT 
      10 FILLER               PIC X(498).                     
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top