Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
SYNCSORT- extracting the info from the copy book?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 29
Location: Chennai

PostPosted: Fri Oct 31, 2008 1:18 pm    Post subject: SYNCSORT- extracting the info from the copy book?
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
References
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 162
Location: hyderabad

PostPosted: Fri Oct 31, 2008 11:58 pm    Post subject: Reply to: SYNCSORT- extracting the info from the copy book?
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 D.

Global Moderator


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

PostPosted: Sat Nov 01, 2008 12:44 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1