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

Print File in Fileaid Format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Thu May 15, 2008 9:29 pm
Reply with quote

Hi,

Can we Print a File Data in FILEAID format using DFSORT?
I tried FILEAID/PRINT, But the Fileaid has a Restriction of 133 bytes length.

Requiremet:
EX:
My File is : VKIT.ESL2
Data : 030 jpndeshai acct1

Lay out is: ESL2RL
01 L2-Records
05 L2-ORG
05 L2-Name
05 L2-Acct

It should print like this:
L2-ORG L2-Name L2 Acct
030 jpndeshai acct1

Can any one please help out ?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu May 15, 2008 9:35 pm
Reply with quote

I don't know what you mead by 'FILEAID format' but have you looked at the OUTFIL Control Statement?
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Thu May 15, 2008 9:42 pm
Reply with quote

CICS Guy,

I did used OUTFIL few times. But there is nothing by which we can directly read a FIle and print it as per the COPY BOOK.

The FILE format i mean is like below:
Code:

ESL2-ORG ESL2-LOGO ESL2-SPSR-ID               ESL2-ID-TYPE ESL2-REC-TYPE       
3/NUM    3/NUM     26/AN                      1/AN         1/AN               
(1-3)    (4-6)     (7-32)                     (33-33)      (34-34)             
2------- 3-------- 4------------------------- 5----------- 6------------       
********************************* TOP OF DATA **********************-CAPS ON-**
       0         0 00000000000000000000000000 0            0                   
      30       300 049000001                  U            2                   
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu May 15, 2008 10:37 pm
Reply with quote

jpdeshai,


Post the cobol layout of ESL2RL and I will show you a way do it using DFSORT
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Thu May 15, 2008 11:32 pm
Reply with quote

Hi the Layout is given below:
Code:

                                                 FIELD                         
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH 
ESL2-RECORD                                                 1     500     500 
5 ESL2-KEY                            GROUP          1      1      53      53 
  10 ESL2-ORG                         999            2      1       3       3 
  10 ESL2-LOGO                        999            3      4       6       3 
  10 ESL2-SPSR-ID                     X(26)          4      7      32      26 
  10 ESL2-ID-TYPE                     X              5     33      33       1 
  10 ESL2-REC-TYPE                    X              6     34      34       1 
  10 ESL2-CARD-NUM                    X(19)          7     35      53      19 


The Input file:
Code:

ESL2-ORG ESL2-LOGO ESL2-SPSR-ID               ESL2-ID-TYPE ESL2-REC-TYPEESL2-CARD-NUM     
3/NUM    3/NUM     26/AN                      1/AN         1/AN         19/AN             
(1-3)    (4-6)     (7-32)                     (33-33)      (34-34)      (35-53)           
2------- 3-------- 4------------------------- 5----------- 6------------7------------------
***************************** TOP OF DATA ******************-CAPS OFF-* *******************
      30       300 049000001                  U            2            7064141878787878782
      31       300 049000001                  U            2            7064141878787878782
      32       300 049000001                  U            2            7064141878787878782
      33       300 049000001                  U            2            7064141878787878782
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 16, 2008 12:16 am
Reply with quote

jpdeshai,

Your input file is 500 bytes and you only show the first few fields on the report. If they are the only fields you need then the following DFSORT JCL will give you the desired results.
Code:

//STEP0100 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*   
//SORTIN   DD DSN=YOUR INPUT FILE,DISP=SHR
//SORTOUT  DD SYSOUT=*               
//SYSIN    DD *                       
  SORT FIELDS=COPY                   
  OUTFIL REMOVECC,                   
  BUILD=(006:1,3,ZD,M10,LENGTH=3,     
         016:4,3,ZD,M10,LENGTH=3,     
         020:7,26,                   
         047:33,1,                   
         060:34,1,                   
         074:35,19)                   
  HEADER2=(001:'ESL2-ORG ',           
           010:'ESL2-LOGO ',         
           020:'ESL2-SPSR-ID ',       
           047:'ESL2-ID-TYPE ',       
           060:'ESL2-REC-TYPE ',     
           074:'ESL2-CARD-NUM '/,     
           001:'======== ',           
           010:'========= ',         
           020:'============ ',       
           047:'============ ',       
           060:'============= ',     
           074:'============= ')     
/*


Hope this helps...

Cheers
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Fri May 16, 2008 12:32 am
Reply with quote

Hi,

I know what you are saying...
but I need the generic one, that's why I had put few fields of the file.

Like If I give 500 byte length file, it should print all the fields.
If I give 1000 byte length fiel it should print all the fields.

It should be like FILEAID PRINT Utility Where you just give the File & Layout and say PRINT...it will print the layout with expanded Layout.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri May 16, 2008 12:56 am
Reply with quote

jpdeshai wrote:
Hi,

I know what you are saying...
but I need the heneric one, that's why I had put few fields of the file.

Like If I give 500 byte length file, it should print all the fields.
If I give 1000 byte length fiel it should print all the fields.

It should be like FILEAID PRINT Utility Where you just give the File & Layout and say PRINT...it will print the layout with expanded Layout.


Sounds like a handy program, why don't you write it and share it with the rest of us.
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Fri May 16, 2008 1:07 am
Reply with quote

I am trying to do that...!!
I thought If any one has already....so...

If I am Succeed, I will do that...
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top