by Vineet » Thu Aug 19, 2010 1:37 pm
Hi SKOLUSU,
Below is My requirement Along with Attributes of File:
File Attribute: LRECL = 1000, Blksize = 0, RECFM = FB.
Records Appearing in INPUT File:
Input Rec:
1 16 Hello How R U ---> ( Value 1 Followed by 8 Spaces,16 Followed by 7 Spaces. Both left Justified)
2 8 MAINFRAME ---> ( Value 2 Followed by 8 Spaces,8 Followed by 8 Spaces. Both left Justified)
19 2 COBOL ---> ( Value 19 Followed by 7 Spaces,2 Followed by 8 Spaces. Both left Justified)
12 18 JCL ---> ( Value 12 Followed by 7 Spaces,18 Followed by 7 Spaces. Both left Justified)
Output Rec:
000000001 000000016 Hello How R U ( 8 Zeros Followed by 1, 7 Zeros followed by 16. Both Right Justified)
000000002 000000008 Mainframe ( 8 Zeros Followed by 2, 8 Zeros followed by 8. Both Right Justified)
000000019 000000002 COBOL ( 7 Zeros Followed by 19,8 Zeros followed by 2. Both Right Justified)
000000012 000000018 JCL ( 7 Zeros Followed by 12, 7 Zeros followed by 18. Both Right Justified)
Note: Length Of Both The Fields need To be Formatted is 9 Byte.
Thanks
Kind Rgds
Vineet Anand