View previous topic :: View next topic
|
Author |
Message |
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 57 Location: US
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 57 Location: US
|
|
|
|
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 |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
jpdeshai,
Post the cobol layout of ESL2RL and I will show you a way do it using DFSORT |
|
Back to top |
|
|
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 57 Location: US
|
|
|
|
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 |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 57 Location: US
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 57 Location: US
|
|
|
|
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 |
|
|
|